home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1991 / 91-07 < prev    next >
Text File  |  1995-12-31  |  121KB  |  3,326 lines

  1. 
  2. Path: ucivax!gateway
  3. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  4. Subject: Re: System 7 Prototypes/Header Files
  5. Message-ID: <18743.9107011121@lfcs.ed.ac.uk>
  6. Newsgroups: fa.think-c
  7. Lines: 11
  8. Date: 1 Jul 91 13:13:22 GMT
  9.  
  10. >The next major
  11. >release of THINK C will fully support development under System 7, and
  12. >it will contain headers and libraries similar to those that we're
  13. >currently distributing.
  14.  
  15. So, does this mean a Sys7.0-aware THINK Class Library? And will it be fully
  16. upward-compatible with the current TCL (i.e. I can port my TCL-derived
  17. subclasses immediately)?
  18.  
  19.         Nick.
  20.  
  21. 
  22. 
  23. Path: ucivax!gateway
  24. From: DNEBING@opie.bgsu.edu ("Mr. Neb")
  25. Subject: Printing a file...
  26. Message-ID: <9107010716.aa11628@ics.uci.edu>
  27. Newsgroups: fa.think-c
  28. X-VMS-To: IN%"think-c@ics.uci.edu"
  29. Lines: 12
  30. Date: 1 Jul 91 14:16:21 GMT
  31.  
  32.  
  33.     This will just take a moment.  I have created a specific file
  34. structure that I would like to print reports on based on this file
  35. structure.  Since this is the first time that I have tried to program
  36. the printing of a record, I would like some advice on the best way to
  37. go about it.
  38.  
  39.     Thanks in advance,
  40.  
  41.     David Nebinger
  42.  
  43.     dnebing@opie.bgsu.edu
  44. 
  45. 
  46. Path: ucivax!gateway
  47. From: petrus@alex.stacken.kth.se (Lars Petrus)
  48. Subject: BUG in ANSI-881 !!
  49. Message-ID: <9107030007.AAalex.stacken.kth.se25932@alex.stacken.kth.se>
  50. Newsgroups: fa.think-c
  51. Lines: 33
  52. Date: 3 Jul 91 01:45:07 GMT
  53.  
  54.    Converting my project to 68881 math, I achieved a major speed improvement
  55. and a few bugs. I think I have narrowed them down to a Real Bug in the
  56. atan2() implementation in ANSI-881. It looks like this:
  57.  
  58. double atan2(y, x)
  59. register double y, x;
  60. {
  61.     register double z;
  62.  
  63.     DomainCheck(x == 0 && y == 0, Zero);
  64.     z = _atan(y / x);
  65.     if (x < 0) {
  66.         if (y < 0)
  67.             z -= Pi;
  68.         else
  69.             z += Pi;
  70.     }
  71.     return(z);
  72. }
  73.  
  74.  
  75.    This looks perfect, but it fails when (x == -0). That changes the sign
  76. of y/x, but does not trigger the (x < 0) test, giving a result of the
  77. opposite of the correct angle!
  78.  
  79.  
  80.    How do I make my program work? The atan2() implementation in ANSI looks
  81. sound. Could I just copy the source code?
  82.  
  83.  
  84.  
  85. "Madness is the first sign of dandruff" |   Email:   petrus@alex.stacken.kth.se
  86.    - Dr Winston O'Boogie                |   Reality: Lars Petrus, Solna, Sweden
  87. 
  88. 
  89. Path: ucivax!gateway
  90. From: Chris_McNeil@macsmtp.csd.unb.ca (Chris McNeil)
  91. Subject: Cdev Crashes
  92. Message-ID: <9107030609.aa22442@ics.uci.edu>
  93. X-Mailer: QuickMail/SMTP interface.
  94. Newsgroups: fa.think-c
  95. Lines: 156
  96. Date: 3 Jul 91 13:09:51 GMT
  97.  
  98. Hi, I wrote a cdev base on the sample cdev that comes with think C.
  99. When I call the following routine when item hit = 3 it works on my SE/30, and
  100. my MacII, but my SE freezes solid. Pete Resnick tells me that I'm writing over
  101. low mem but I'm just begining to program on the mac and I can't find the
  102. problem. Here is the code. Can anyone give me any hints about what is obviously
  103. wrong.
  104. This is part of NetCookie ( a mac cookie client). This program will be free and
  105. posted on the info-mac archives if I can get this part to work( the init part
  106. works fine).  Also anyone helping me will recieve due credit in the about
  107. NetCookie dialog.
  108.  
  109. Chris McNeil
  110. cjm@unb.ca
  111.  
  112. void cookie()
  113. {
  114.     int errCode;
  115.     WindowPtr MyWindow;
  116.     GrafPort saveport;
  117.     int Done;
  118.     EventRecord myEvent;
  119.     int charcode;
  120.     int index;
  121.     Rect windowbounds;
  122.     int lines;
  123.     Str255 buf;
  124.     int LookupAddr();
  125.     unsigned long refnum;
  126.     unsigned long rbuffer[rbuffer_len];
  127.     unsigned long ipaddr;
  128.         struct {
  129.         wdsEntry Buffer;
  130.         short Terminator;
  131.     } myData = {{0,0},0};
  132.  
  133.     char cookieStr[2048];    /* buffer for quote returned from cookie server */
  134.      UDPiopb CookiePB;
  135.  
  136.     /* Get the server name that the user entered in the cdev */
  137.  
  138.      editrec=TEGetText(hTE);
  139.      GetIText((Handle)editrec,buf);
  140.     PtoCstr((char *)buf);
  141.  
  142. /* Look up the address */
  143.  
  144.         errCode=LookupAddr((char *)buf);
  145.         refnum=pb.ioParam.ioRefNum;
  146.         if (errCode != 0) {
  147.          CkieAlert();        /* if lookup of name fails post an alert */
  148.         }
  149.    else {
  150.  
  151.      ipaddr=serverInfo.addr[0];    /* use the first address returned */
  152.  
  153.     /* Create an UPB stream */
  154.  
  155.     CookiePB.csCode=UDPCreate;
  156.     CookiePB.ioCRefNum=refnum;
  157.     CookiePB.csParam.create.rcvBuff=(Ptr)&rbuffer;
  158.     CookiePB.csParam.create.rcvBuffLen=rbuffer_len;
  159.     CookiePB.csParam.create.notifyProc=0L;
  160.     CookiePB.csParam.create.localPort=0;
  161.     CookiePB.csParam.create.userDataPtr=0L;
  162.     errCode=PBControl(&CookiePB, false);
  163.  
  164.     if ( errCode == noErr ) {
  165.  
  166.     /*send an UDP  packet to the cookie server */
  167.  
  168.         CookiePB.csCode=UDPWrite;
  169.         CookiePB.csParam.send.remoteHost=ipaddr;
  170.         CookiePB.csParam.send.remotePort=17;             /* cookie server port */
  171.         CookiePB.csParam.send.wdsPtr=(Ptr)&myData;  /* send an UDP datagram */
  172.         CookiePB.csParam.send.checkSum=0;
  173.         CookiePB.csParam.send.userDataPtr=0L;
  174.         errCode=PBControl(&CookiePB, false);
  175.  
  176.     }
  177.     /* listen for a quote back from the server    */
  178.  
  179.     if ( errCode == noErr ) {
  180.  
  181.         CookiePB.csCode=UDPRead;
  182.         CookiePB.csParam.receive.timeOut=ckie.cookietout;
  183.         CookiePB.csParam.receive.secondTimeStamp=0;
  184.         CookiePB.csParam.receive.userDataPtr=0L;
  185.         errCode=PBControl(&CookiePB, false);
  186.         if (errCode != noErr) {
  187.         alertact=1;
  188.         NoteAlert(-4065,0L);      /* Alert if error */
  189.         alertact=0;
  190.         }
  191.  
  192.         }
  193.  
  194.     if ( errCode == noErr ) {
  195.  
  196.         /* Take the newlines out of the return quote */
  197.         index=0;
  198.         lines=0;
  199.         while (index != CookiePB.csParam.receive.rcvBuffLen){
  200.         cookieStr[index]=*CookiePB.csParam.receive.rcvBuff;
  201.         if (*CookiePB.csParam.receive.rcvBuff == '\n') {
  202.         cookieStr[index]='\r';  /* Put in a return */
  203.         lines++;
  204.         }
  205.         index++;
  206.         *CookiePB.csParam.receive.rcvBuff++;
  207.         }
  208.         cookieStr[index]='\0'; /* Terminate the string */
  209.  
  210.         /* Convert to Pascal string  */
  211.  
  212.         CtoPstr((char *)cookieStr);
  213.  
  214.         /* Calculate the size of the window needed for the cookie reponse */
  215.  
  216.         windowbounds.top=30;
  217.         windowbounds.left=8;
  218.         windowbounds.right=508;
  219.         windowbounds.bottom=(((16* lines)+windowbounds.top));
  220.         GetPort(&saveport);
  221.  
  222.         MyWindow=NewWindow(0L,&windowbounds,"",1,2,-1L,1,1);
  223.         SetPort(MyWindow);
  224.  
  225.  
  226.         /* Write the cookie to the window    */
  227.  
  228.          ShowWindow(MyWindow);
  229.         TextBox((Ptr)&cookieStr[1],index,(&(*MyWindow).portRect),0);
  230.  
  231.     /* Wait until mouse down to kill window */
  232.  
  233.     for(;;){
  234.              GetNextEvent(everyEvent, &myEvent);
  235.              if (myEvent.what==mouseDown ) break;
  236.  
  237.                }
  238.  
  239.  
  240.     DisposeWindow(MyWindow);
  241.     SetPort(&saveport);
  242.  
  243.  
  244. }
  245. /* Release the stream when done */
  246.      CookiePB.csCode=UDPRelease;
  247.      errCode=PBControl(&CookiePB, false);
  248.  
  249. }
  250.  
  251. }
  252.  
  253.  
  254. 
  255. 
  256. Path: ucivax!gateway
  257. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  258. Subject: TC4.0.5, Sys7.0 cosmetic bug
  259. Message-ID: <28802.9107020953@lfcs.ed.ac.uk>
  260. Newsgroups: fa.think-c
  261. Lines: 7
  262. Date: 3 Jul 91 16:16:01 GMT
  263.  
  264. Are you supposed to be able to switch THINK C into the background while
  265. it's compiling something? Certainly seems possible under Sys7.0, which is
  266. nice, except that the line number counts always get drawn directly onto the
  267. screen, regardless of whose window(s) happen to be there.
  268.  
  269.         Nick.
  270.  
  271. 
  272. 
  273. Path: ucivax!gateway
  274. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  275. Subject: TC4.0.5, Sys7.0 cosmetic bug
  276. Message-ID: <9107031852.AA02881@chaos.cs.brandeis.edu>
  277. In-Reply-To: Nick Rothwell's message of 3 Jul 91 16:16:01 GMT <28802.9107020953@lfcs.ed.ac.uk>
  278. Newsgroups: fa.think-c
  279. Lines: 9
  280. Date: 3 Jul 91 18:54:28 GMT
  281.  
  282.    Are you supposed to be able to switch THINK C into the background
  283.    while it's compiling something? Certainly seems possible under
  284.    Sys7.0, which is nice, except that the line number counts always
  285.    get drawn directly onto the screen, regardless of whose window(s)
  286.    happen to be there.
  287.  
  288. It's a bug, not a feature :-(.
  289.  
  290.     -phil
  291. 
  292. 
  293. Path: ucivax!gateway
  294. From: fleabag@athena.mit.edu
  295. Subject: a few "big" questions
  296. Message-ID: <9107040548.AA21952@e40-008-10.MIT.EDU>
  297. Newsgroups: fa.think-c
  298. Lines: 36
  299. Date: 4 Jul 91 05:48:55 GMT
  300.  
  301.  
  302.  
  303. hi,
  304.  
  305. though this probably belongs more in comp.sys.mac.programmer, i can
  306. never keep up with the traffic there.  so i'm posting these questions
  307. here, even though their relevance to the think c environment is
  308. somewhat questionable...
  309.  
  310. here goes...any insight would be *mucho* welcome!
  311.  
  312.  
  313. (1) how do people store pointers?  that is, how can i maintain *references*
  314. to other objects when i store an object, either on the scrap or in a
  315. file?  this is major design issue for me, though there's probably some
  316. simple solution that i've overlooked.
  317.  
  318. for example, object A and object B both need to be stored. object A has
  319. a reference to object B to link the two.  how can this relationship be
  320. preserved through the save/restore process?
  321.  
  322. (2) how can i manage huge resources?  these are resources which are likely
  323. to be much too big to fit in ram.  i'd like to be able to do what i'd do
  324. if the information were in a data fork:  keep a filePos handy, read in
  325. a bite-size chunk, play with it in ram, write it back to the same spot in
  326. the file, and advance the filePos.  (aside: i can't use the data fork for
  327. this application because it's possible that there will be a dozen independent
  328. entities needed. this creates unsightly temp-files and could run into the
  329. max-num-of-files-open limit.)
  330.  
  331.  
  332. the proverbial "thanks-in-advance", with the hope that they'll be
  333. well-deserved...;)
  334.  
  335. :jeff bellsey
  336. fleabag@athena.mit.edu
  337. 
  338. 
  339. Path: ucivax!gateway
  340. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  341. Subject: Re: TC4.0.5, Sys7.0 cosmetic bug
  342. Message-ID: <24029.9107040929@lfcs.ed.ac.uk>
  343. Newsgroups: fa.think-c
  344. Lines: 12
  345. Date: 4 Jul 91 09:48:49 GMT
  346.  
  347. >It's a bug, not a feature :-(.
  348.  
  349. Fair enough. The question still stands, though: is the bug the fact that I
  350. am able to compile in the background, or is it just the bad display when I
  351. do? I can't say I find background compilation that useful (at several
  352. hundred lines per sec. it hardly seems worth it) but it's silly to disallow
  353. it. If it *is* allowed, though, the compiler should at least call
  354. GetNextEvent() more often, get rid of its modal dialog window, and use the
  355. Notification Manager for errors/completion.
  356.  
  357.         Nick.
  358.  
  359. 
  360. 
  361. Path: ucivax!gateway
  362. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  363. Subject: TC4.0.5, Sys7.0 cosmetic bug
  364. Message-ID: <9107042122.AA14466@chaos.cs.brandeis.edu>
  365. In-Reply-To: Nick Rothwell's message of 4 Jul 91 09:48:49 GMT <24029.9107040929@lfcs.ed.ac.uk>
  366. Newsgroups: fa.think-c
  367. Lines: 19
  368. Date: 4 Jul 91 21:25:02 GMT
  369.  
  370.    >It's a bug, not a feature :-(.
  371.  
  372.    Fair enough. The question still stands, though: is the bug the fact
  373.    that I am able to compile in the background, or is it just the bad
  374.    display when I do?
  375.  
  376. Yes, it's a bug that THINK C lets you switch it out when it's
  377. compiling.  THINK C isn't designed to be run in the background,
  378. although background compilation is an idea that we're considering.
  379. The main problem is that the THINK C compiler is coded specifically
  380. for speed, and recoding it for both speed and backgrounding would
  381. probably not produce satisfactory results.  It certainly is an
  382. interesting idea, though.
  383.  
  384.     -phil
  385. ----
  386.    Phil Shapiro                           Technical Support Analyst
  387.    Language Products Group                     Symantec Corporation
  388.         Internet: phils@chaos.cs.brandeis.edu
  389. 
  390. 
  391. Path: ucivax!gateway
  392. From: PET101@ukcc.uky.edu (Jamer)
  393. Subject: My first foray
  394. Message-ID: <9107051330.aa16869@ics.uci.edu>
  395. Newsgroups: fa.think-c
  396. Lines: 13
  397. Date: 5 Jul 91 20:30:14 GMT
  398.  
  399. OK,
  400.  
  401. I'm trying to learn this think c business, so I bought the Mac Programming
  402. Primer.  Like everyone else, I did the Hello World Program, and thought I was
  403. off on the road.  But, I typed in the Hello2 program (in the book), and found
  404. a bug that I have no idea what to do.  I've gone through to check my typing,
  405. but every time I try to precompile, or check syntax, or run, or anything else,
  406. I get the message "Can't open #include'd file".  Now I know very little about
  407. C, but I do know that there are no #include files called in the Hello2 source.
  408. Can anyone help an absolute beginner?
  409.  
  410. Later,
  411. Jamer.
  412. 
  413. 
  414. Path: ucivax!gateway
  415. From: Mark.Alldritt@vancouver.osiware.bc.ca (Mark Alldritt)
  416. Subject: Editor window sizes
  417. Message-ID: <9107051250*Mark.Alldritt@Vancouver.osiware.bc.ca>
  418. Newsgroups: fa.think-c
  419. Lines: 12
  420. Date: 5 Jul 91 20:35:58 GMT
  421.  
  422. Hello,
  423.  
  424.     I'm looking for a way of altering the default size of THINK-C Editor
  425. windows.  Specifically, I want the windows to be narrower on my two-page
  426. display.  The default window size is too wide to have two files displayed
  427. side-by-side which forces me to resize every window I open.  This is not a
  428. show-stopper, just a time waster.
  429.  
  430.     Is there a resource within THINK-C that governs this?
  431.  
  432. Thanks in advance
  433. -Mark
  434. 
  435. 
  436. Path: ucivax!gateway
  437. From: dedreb@arco.com ("Richard E Beecher (907")
  438. Subject: Attaching a document when using LaunchApplication()
  439. Message-ID: <9107052226.AA07464@Arco.COM>
  440. Newsgroups: fa.think-c
  441. Lines: 9
  442. Date: 5 Jul 91 22:26:31 GMT
  443.  
  444.  
  445. I am trying to write an application that will launch an application along
  446. with an associated document using the new toolbox routine LaunchApplication.
  447. I understand how to launch the application, but I don't know how to attach
  448. a document to the launch parameter block. Has anyone out there done this?
  449. Any help would be greatly appreciated.  Thanks in advance,
  450.  
  451. Richard Beecher
  452. dedreb@arco.com  (Arco Alaska, Inc.)
  453. 
  454. 
  455. Path: ucivax!gateway
  456. From: barry@world.std.com (Barry L Wolman)
  457. Subject: CDEFs in Desk Accessories
  458. Message-ID: <9107060400.AA28717@world.std.com>
  459. X-Mailer: ELM [version 2.3 PL11]
  460. Newsgroups: fa.think-c
  461. Lines: 58
  462. Date: 6 Jul 91 04:01:14 GMT
  463.  
  464. I'm having some problems trying to use two custom CDEFs in a DA
  465. written in Think C.  The CDEFs have IDs -16000 and -15999 so they can
  466. be owned by the DA and be moved with the other resources by Font/DA
  467. Mover.  This means the CDEFs can't be referenced from the controls
  468. that need to use them.  My plan to get around this problem is to store
  469. the handle to the CDEF in the controls that use them.
  470.  
  471. First, I load the CDEF resources by name and lock the handles
  472.  
  473.     if ((Hpopup = GetNamedResource('CDEF',POPUP_NAME)) == nil) return(0);
  474.     if ((Hdefault = GetNamedResource('CDEF',DEFAULT_NAME)) == nil) return(0);
  475.  
  476.     HLock(Hpopup);
  477.     HLock(Hdefault);
  478.  
  479. My  code that displays the startup dialog is
  480.  
  481. int startup_dialog()
  482.     {
  483.     DialogPtr    startup_dp;
  484.     ...
  485.  
  486.     if ((startup_dp = GetNewDialog(STARTUPBOX, 0L, (WindowPtr)-1)) == nil)
  487.         return FALSE;
  488.  
  489.     if (!GetCustomControl(START_CONTROL,startup_dp,Hdefault,START_VARIANT)) {
  490.         DisposDialog(startup_dp);
  491.         return FALSE;
  492.         }
  493.  
  494.     ...
  495.     }
  496.  
  497. GetCustomControl is a utility function I wrote to load a control and
  498. set the contrlDefProc; its code is
  499.  
  500. int GetCustomControl(short id, WindowPtr wptr,Handle Hcdef,short variant)
  501.     {
  502.     ControlHandle ch;
  503.  
  504.     if ((ch = GetNewControl(id,wptr)) == nil) return FALSE;
  505.     (*ch) -> contrlDefProc = (Handle)(((long)Hcdef & 0xffffff) | (variant <<
  506. 24));
  507.     return TRUE;
  508.     }
  509.  
  510. I've used breakpoints to verify that the contrl record is modified
  511. properly.  Yet, when the dialog window appears, I get a bus error
  512. inside the CDEF.  If I remove the assignment to contrlDefProc and
  513. rerun, the bus error disappears (although, obviously, the control
  514. doesn't use the desired CDEF).
  515.  
  516. Perhaps I'm too close to the trees to see the forest.  What am I
  517. doing wrong?
  518.  
  519. In case it makes any differences, I'm running 6.0.5 on a 8MB IIci.
  520.  
  521. Thanks, Barry
  522. 
  523. 
  524. Path: ucivax!gateway
  525. From: fleabag@athena.mit.edu
  526. Subject: thanks, and more!
  527. Message-ID: <9107060444.AA07316@e40-008-8.MIT.EDU>
  528. Newsgroups: fa.think-c
  529. Lines: 31
  530. Date: 6 Jul 91 04:44:58 GMT
  531.  
  532.  
  533. hi,
  534.  
  535. thanks to all who responded about storing references (the solution,
  536. for those who may encounter the same problem: keep some sort of
  537. hash table with an index to every pointer referenced, then replace
  538. references with indexes).
  539.  
  540. however, the responses about managing huge resources were not entirely
  541. usable.  the suggestions revolved around new toolbox calls
  542. "ReadPartialResource" and "WritePartialResource".  these (unfortunately)
  543. sound like *exactly* what i need, if it weren't for the fact that
  544. they're not yet implemented in think c.  could i use them anyway, if
  545. i want my application to run under sys6?
  546.  
  547. i suppose i was looking for some insight into finagling with the
  548. resource map, using PB-calls on the resource fork.  if anyone has
  549. anything helpful here, i would *much* appreciate it...
  550.  
  551. a new question: i vaguely remember a class someone posted
  552. which allowed you to create classes based on a single integer
  553. without "switching" the int.  ie, by using some preprocessor
  554. directive, you could take an int and create a class.  for example:
  555.     if i=1, create/init CJoe
  556.     if i=2, create/init CSpike
  557.     if i=3, create/init CCrusher
  558.  
  559. is this possible??
  560.  
  561. :jeff bellsey
  562. fleabag@athena.mit.edu
  563. 
  564. 
  565. Path: ucivax!gateway
  566. From: PET101@ukcc.uky.edu (Jamer)
  567. Subject: Me again!
  568. Message-ID: <9107052301.aa02188@ics.uci.edu>
  569. Newsgroups: fa.think-c
  570. Lines: 12
  571. Date: 6 Jul 91 06:01:33 GMT
  572.  
  573. Hi,
  574.  
  575. Thanks to everyone who gave suggestions as to what to do with the #include
  576. problem.  I changed the Option, but have now run into an Invalid Declaration at
  577. the following:
  578.  
  579. WindowPtr       gHelloWindow
  580.  
  581. This comes right after the #define's.  Any ideas?
  582.  
  583. Thanks,
  584. Jamer.
  585. 
  586. 
  587. Path: ucivax!orion.oac.uci.edu!nntpsrv
  588. From: bdugan@teri.bio.uci.edu (Bill Dugan)
  589. Subject: Debugger crashes when I try looking at rect.topLeft
  590. Nntp-Posting-Host: teri.bio.uci.edu
  591. Message-ID: <287585AC.27757@orion.oac.uci.edu>
  592. Newsgroups: fa.think-c
  593. Organization: University of California, Irvine
  594. Lines: 15
  595. Date: 6 Jul 91 08:56:12 GMT
  596. Distribution: fa
  597.  
  598. When I have a Rect called "rect" and I use the Think C debugger to look at
  599.  
  600. rect.topLeft
  601.  
  602. the debugger crashes into Macsbug!  I had a problem defining rect.topLeft
  603. as a legitimate structure, also; when I try to access rect.topLeft in my
  604. code, the compiler tells me that topLeft is an unknown struct/union member.
  605. Is there something wrong with my setup?  Do I have a problem with my
  606. libraries?  Or is this actually a bug?
  607.  
  608. I'm running THINK C 4.0.5 on a Mac Plus with System 7, 4 megs of RAM.
  609. I am using the standard MacHeaders.
  610.  
  611. bill
  612.  
  613. 
  614. 
  615. Path: ucivax!gateway
  616. From: tarr-michael@cs.yale.edu ("Michael J. Tarr")
  617. Subject: removal from list
  618. Full-Name: "Michael J. Tarr"
  619. Message-ID: <9107061332.AA13943@thailand.CS.YALE.EDU>
  620. Newsgroups: fa.think-c
  621. Lines: 4
  622. Date: 6 Jul 91 13:32:28 GMT
  623.  
  624.  
  625. Please remove tarr@cs.yale.edu from the think-c mailing list.
  626.  
  627.  
  628. 
  629. 
  630. Path: ucivax!gateway
  631. From: motegi@neon.stanford.edu (Tsuyoshi Motegi)
  632. Subject: Removal from List
  633. Message-ID: <CMM.0.90.2.678820373.motegi@Neon.Stanford.EDU>
  634. Newsgroups: fa.think-c
  635. Lines: 3
  636. Date: 6 Jul 91 17:13:15 GMT
  637.  
  638. Please remove motegi@neon.stanford.edu from the mailing list.
  639.  
  640.                         --tm
  641. 
  642. 
  643. Path: ucivax!gateway
  644. From: EAO102@psuvm.psu.edu (Ernie Oporto 867-5212)
  645. Subject: Help with Updates and structs (long)
  646. Message-ID: <9107061253.aa12996@ics.uci.edu>
  647. Newsgroups: fa.think-c
  648. Lines: 131
  649. Date: 6 Jul 91 19:53:55 GMT
  650.  
  651.     My problem is this.  On the advice of some people, I have
  652. tried to make a structure to hold the information for windows and
  653. associated picture id's in, so as to avoid having a long list of
  654. if-then testing.  I seem to be having major problems in keeping
  655. all of the pointers straight, as I hardly understand them.  If
  656. anyone can look at this code and tell me whats wrong with my struct
  657. and why the program quits for no reason, I would greatly appreciate it.
  658. (Please?!?!?!  This is driving me insane!)
  659.  
  660. /*** PICTWindow structure ***/
  661. typedef struct
  662. {
  663.     WindowPtr    newWindow;
  664.     short        pictId;
  665. }    PICTWindow;
  666.  
  667.  
  668. PICTWindow        gSplashWindow,gHeightWindow;
  669.             /*** and other globals ***/
  670.  
  671. /***main***/
  672. main()
  673. {
  674.     ...
  675.     SplashInit();
  676.     MainLoop();
  677.         /*** this calls HandleEvent which calls
  678.         HandleFileChoice when the cursor is in MenuBar***/
  679.     ...
  680. }
  681.  
  682.  
  683.  
  684. (I have a problem in SplashInit where the program just quits on the
  685. DisposeWindow call.)
  686.  
  687.  
  688.  
  689. /*** SplashInit ***/
  690. SplashInit()
  691. {
  692.     CreateWindow(BASE_RES_ID,gSplashWindow);
  693.     while(!Button());
  694.     DisposeWindow(gSplashWindow.newWindow);
  695. }
  696.  
  697.  
  698. /*** HandleFileChoice ***/
  699. HandleFileChoice(theItem)
  700. int        theItem;
  701. {
  702.     WindowPtr    whichWindow;
  703.  
  704.     switch(theItem)
  705.     {
  706.         case HEIGHT_ITEM:/*** these menu selections make
  707.                             the Height window appear ***/
  708.             CreateWindow(BASE_RES_ID+2,gHeightWindow);
  709.             break;
  710.         case ....
  711.     }
  712. }
  713.  
  714.  
  715. /*** CreateWindow ***/
  716. CreateWindow(theResId,createWind)
  717. short        theResId;
  718. PICTWindow    *createWind;
  719. {
  720.     WindowPtr    theWind;
  721.  
  722.     theWind = GetNewWindow(theResId,NIL_POINTER,MOVE_TO_FRONT);
  723.     createWind->pictId = theResId;
  724.     createWind->newWindow = theWind;
  725.  
  726.     ShowWindow(createWind->newWindow);
  727.     SetPort(createWind->newWindow);
  728.  
  729.     DrawMyPicture(createWind);
  730. }
  731.  
  732. /*** DrawMyPicture ***/
  733. DrawMyPicture(pictWindPtr)
  734. PICTWindow        *pictWindPtr;
  735. {
  736.     Rect             myRect;
  737.     PicHandle        thePicture;
  738.     WindowPtr        theWindow;
  739.  
  740.     thePicture = GetPicture(pictWindPtr->pictId);
  741.     theWindow = pictWindPtr->newWindow;
  742.  
  743.     myRect = theWindow->portRect;
  744.     CenterPict(thePicture,&myRect);
  745.     SetPort(theWindow);
  746.     DrawPicture(thePicture,&myRect);
  747. }
  748.  
  749. /*** HandleEvent ***/
  750. HandleEvent()
  751. {
  752.     ...
  753.     switch(gTheEvent.what)
  754.     {
  755.        ...
  756.         case updateEvt:
  757.             if(!IsDAWindow(theWindow))
  758.             {
  759.                 GetPort(&oldPort);
  760.                 SetPort(theWindow);
  761.                 BeginUpdate(theWindow);
  762.                 DrawMyPicture(theWindow);
  763.                 EndUpdate(theWindow);
  764.                 SetPort(oldPort);
  765.             }
  766.             break;
  767.     }
  768. }
  769.  
  770.  
  771.  
  772.  
  773. Ernie "SHOKK" Oporto();
  774. {
  775.       _____)           ______        _)       _)  EAO102@PSUVM.PSU.EDU
  776.                                    __       __          Student
  777.     ______    ______            ___      ___      Computer Laboratory
  778.                                    __       __      Attendant of the
  779.     (_______ _      _ ________ _     _) _     _)  PennState University
  780.                                                   Center for Academic
  781. }                                                      Computing
  782. 
  783. 
  784. Path: ucivax!gateway
  785. From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
  786. Subject: Re: Attaching a document when using LaunchApplication()
  787. Message-ID: <9107071945.AA10192@neutron.LCS.MIT.EDU>
  788. In-Reply-To: Your message of 05 Jul 91 22:26:31 +0000.
  789.              <9107052226.AA07464@Arco.COM>
  790. Newsgroups: fa.think-c
  791. Lines: 7
  792. Date: 7 Jul 91 19:46:15 GMT
  793.  
  794. > I am trying to write an application that will launch an application along
  795. > with an associated document using the new toolbox routine LaunchApplication.
  796. > I understand how to launch the application, but I don't know how to attach
  797. > a document to the launch parameter block.
  798.  
  799. Wouldn't the politically correct way to do this under System 7 be to
  800. launch the application, then send it an
  801. 
  802. 
  803. Path: ucivax!gateway
  804. From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
  805. Subject: Re: Attaching a document when using LaunchApplication()
  806. Message-ID: <9107071949.AA10200@neutron.LCS.MIT.EDU>
  807. In-Reply-To: Your message of 05 Jul 91 22:26:31 +0000.
  808.              <9107052226.AA07464@Arco.COM>
  809. Newsgroups: fa.think-c
  810. Lines: 16
  811. Date: 7 Jul 91 19:49:39 GMT
  812.  
  813. Sorry for inadvertently sending out an incomplete message.
  814.  
  815. I was going to suggest that the "correct" way to do this would be to
  816. send the sub-application an Open Document Apple Event, but then I
  817. realized that the sub-app would then have to be AppleEvent-aware,
  818. which you probably can't guarantee.
  819.  
  820. Another option might be to send the appropriate events to the Finder
  821. to get it to launch the application for you (and open the document).
  822. I have a feeling that Apple probably prefers that method.
  823.  
  824. Unfortunately, I don't have any System 7 documentation handy at the
  825. moment, so I can't be more specific.
  826.  
  827. -- Russell Finn
  828. rsfinn@lcs.mit.edu
  829. 
  830. 
  831. Path: ucivax!gateway
  832. From: k044477@hobbes.kzoo.edu (Jamie McCarthy)
  833. Subject: AppleEvents and the TCL
  834. Message-ID: <9107072212.AA05086@hobbes.kzoo.edu>
  835. X-Mailer: ELM [version 2.3 PL11]
  836. Newsgroups: fa.think-c
  837. Lines: 38
  838. Date: 7 Jul 91 22:12:01 GMT
  839.  
  840. Has anyone experimented with including AppleEvents into the Think Class
  841. Library?  Neither I nor my applications are system-7.0 savvy yet, so I'm
  842. not sure what it would involve, but it would seem that a modification to
  843. (or a subclass of) CSwitchboard would be appropriate.
  844.  
  845. From looking briefly at some sample code, it appears that there are
  846. three major parts to the task:  (1) calling an initialization routine at
  847. startup time, like so:
  848.  
  849. theOSErr = AEInstallEventHandler (kCoreEventClass, kAEQuitApplication,
  850.     (EventHandlerProcPtr) HandleAEquit, 0, false);
  851.  
  852. (2) checking events to see if they're High-Level (CSwitchboard's job):
  853.  
  854. if (anEvent.what == kHighLevelEvent)
  855.     (void) AEProcessAppleEvent (&anEvent);
  856.  
  857. and (3) implementing the handler itself:
  858.  
  859. static pascal void HandleAEquit (AppleEvent *quitAppleEvent,
  860.     AppleEvent *reply, long handlerRefCon)
  861. {
  862. /* The quit AE has no parms, but check in case the client requires any */
  863.     if (DoneRequiredParams (quitAppleEvent) == noErr)
  864.         gQuitting = true;
  865. }
  866.  
  867. Is this essentially all that needs to be done?  Has anyone done it
  868. already?  Do I need to do these three steps for each AE I implement
  869. ('cos this only handles quit)?
  870.  
  871. The source code was taken from the GMonde example, off the Developers'
  872. CD I believe.
  873. --
  874.  Jamie McCarthy                           k044477@kzoo.edu
  875.  Disclaimer: it's my responsibility iff they're my words.
  876.  Alle diese Gleichnisse wollen eigentlich nur sagen, dass das Unfassbare
  877.  unfassbar ist, und das haben wir gewusst.
  878. 
  879. 
  880. Path: ucivax!gateway
  881. From: dave@ccs.itd.umich.edu
  882. Subject: Re: Attaching a document when using LaunchApplication()
  883. Message-ID: <9107072325.AA01891@ccs.itd.umich.edu>
  884. In-Reply-To: Your message of "07 Jul 91 19:49:39 GMT."
  885.              <9107071949.AA10200@neutron.LCS.MIT.EDU>
  886. Newsgroups: fa.think-c
  887. Lines: 10
  888. Date: 7 Jul 91 23:35:09 GMT
  889.  
  890. >I was going to suggest that the "correct" way to do this would be to
  891. >send the sub-application an Open Document Apple Event, but then I
  892. >realized that the sub-app would then have to be AppleEvent-aware,
  893. >which you probably can't guarantee.
  894.  
  895. The receiving application does NOT have to be AppleEvent aware to
  896. accept the open document event.  If the application is not AE aware,
  897. the system will simulate an Open, and then the return from SFGetFile
  898. just like MultiFinder has been doing for years.
  899.   --dave koziol
  900. 
  901. 
  902. Path: ucivax!gateway
  903. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  904. Subject: Debugger crashes when I try looking at rect.topLeft (THC 4.0.5)
  905. Message-ID: <9107080028.AA21946@chaos.cs.brandeis.edu>
  906. In-Reply-To: Bill Dugan's message of 6 Jul 91 08:56:12 GMT <287585AC.27757@orion.oac.uci.edu>
  907. Newsgroups: fa.think-c
  908. Lines: 48
  909. Date: 8 Jul 91 00:28:18 GMT
  910.  
  911.    When I have a Rect called "rect" and I use the Think C debugger to
  912.    look at
  913.  
  914.    rect.topLeft
  915.  
  916.    the debugger crashes into Macsbug!  I had a problem defining
  917.    rect.topLeft as a legitimate structure, also; when I try to access
  918.    rect.topLeft in my code, the compiler tells me that topLeft is an
  919.    unknown struct/union member.  Is there something wrong with my
  920.    setup?  Do I have a problem with my libraries?  Or is this actually
  921.    a bug?
  922.  
  923. The bug is in the THINK C Debugger.  It gets really confused when you
  924. try do display a macro, especially when the macro expects arguments
  925. and you don't provide them.  "What macro?"  Well, THINK C implements
  926. the topLeft and botRight fields of the QuickDraw Rect type as macros,
  927. so you can say:
  928.  
  929.    topLeft(rect).h = botRight(rect).v * 10;    /* or whatever */
  930.  
  931. The reason that topLeft and botRight aren't implemented "correctly" as
  932. they are in Pascal, is because that a C union requires the union's
  933. field names for referencing, whereas Pascal can resolve unions
  934. ("variant records" in Pascal) without any extra names.  E.g., if you
  935. had:
  936.  
  937.     typedef union {
  938.         struct {
  939.             short top, left, bottom, right
  940.         } coords;
  941.         struct {
  942.             Point topLeft, botRight;
  943.         } points;
  944.     } Rect;
  945.  
  946. You'd have to say "rect.coords.top" or "rect.points.topLeft".  For a
  947. bigger example of this problem, check out the PB structures in IM IV,
  948. and their definitions in HFS.h.  Here unions are used, but it's much
  949. less convenient in C than in Pascal.
  950.  
  951. MPW C does not define the macros (or fields) topLeft and botRight,
  952. they're not implemented at all.
  953.  
  954.     -phil
  955. ----
  956.    Phil Shapiro                           Technical Support Analyst
  957.    Language Products Group                     Symantec Corporation
  958.         Internet: phils@chaos.cs.brandeis.edu
  959. 
  960. 
  961. Path: ucivax!orion.oac.uci.edu!teri.bio.uci.edu!bdugan
  962. From: bdugan@teri.bio.uci.edu (Bill Dugan)
  963. Subject: Re: Debugger crashes when I try looking at rect.topLeft (THC 4.0.5)
  964. Nntp-Posting-Host: teri.bio.uci.edu
  965. Message-ID: <2877CF61.22732@orion.oac.uci.edu>
  966. Summary: Oh well.  Asi es la vida.
  967. Newsgroups: fa.think-c
  968. Organization: University of California, Irvine
  969. Lines: 16
  970. Date: 8 Jul 91 02:35:13 GMT
  971. References: <9107080028.AA21946@chaos.cs.brandeis.edu>
  972.  
  973. In article <9107080028.AA21946@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
  974. >The reason that topLeft and botRight aren't implemented "correctly" as
  975. >they are in Pascal, is because that a C union requires the union's
  976. >field names for referencing, whereas Pascal can resolve unions
  977. >("variant records" in Pascal) without any extra names.  E.g., if you
  978. >had:
  979. >
  980. > [...]
  981.  
  982. Thanks for the information.  I just wanted to do as suggested in
  983. IM's description of LocalToGlobal() to convert the coordinates of a Rect
  984. by passing rect.topLeft and then rect.botRight.  I ended up manually
  985. grabbing the window's position and using OffsetRect() instead.
  986.  
  987. bill
  988.  
  989. 
  990. 
  991. Path: ucivax!gateway
  992. From: hansm@fwi.uva.nl (Hans van der Meer)
  993. Subject: mailing list
  994. Message-ID: <9107080751.AA05226@donald.fwi.uva.nl>
  995. Newsgroups: fa.think-c
  996. X-Telex: 16460 facwn nl
  997. Lines: 1
  998. Date: 8 Jul 91 07:52:12 GMT
  999. X-Phone: +31 20 525 5200
  1000. X-Fax: +31 20 525 5101
  1001. X-Organisation: Faculty of Mathematics & Computer Science
  1002.                 University of Amsterdam
  1003.                 Plantage Muidergracht 24
  1004.                 NL-1018 TV Amsterdam
  1005.                 The Netherlands
  1006.  
  1007. please remove hansm@fwi.uva.nl from the think-c mailing list.
  1008. 
  1009. 
  1010. Path: ucivax!gateway
  1011. From: k044477@hobbes.kzoo.edu (Jamie McCarthy)
  1012. Subject: Re: topLeft & botRight
  1013. Message-ID: <9107081221.AA08811@hobbes.kzoo.edu>
  1014. In-Reply-To: <2877CF61.22732@orion.oac.uci.edu>; from "Bill Dugan" at Jul 8, 91 2:35 am
  1015. X-Mailer: ELM [version 2.3 PL11]
  1016. Newsgroups: fa.think-c
  1017. Lines: 15
  1018. Date: 8 Jul 91 12:20:44 GMT
  1019.  
  1020. Bill Dugan writes:
  1021. >
  1022. > Thanks for the information.  I just wanted to do as suggested in
  1023. > IM's description of LocalToGlobal() to convert the coordinates of a Rect
  1024. > by passing rect.topLeft and then rect.botRight.  I ended up manually
  1025. > grabbing the window's position and using OffsetRect() instead.
  1026.  
  1027. No need, I don't think.  Try:
  1028.  
  1029. LocalToGlobal(&topLeft(myRect));
  1030. LocalToGlobal(&botRight(myRect));
  1031. --
  1032.  Jamie McCarthy                           k044477@kzoo.edu
  1033.  Disclaimer: it's my responsibility iff they're my words.
  1034.  There is an emerald here the size of a plover's egg!
  1035. 
  1036. 
  1037. Path: ucivax!gateway
  1038. From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
  1039. Subject: Re: Attaching a document when using LaunchApplication()
  1040. Message-ID: <9107092318.AA13185@neutron.LCS.MIT.EDU>
  1041. In-Reply-To: Your message of 07 Jul 91 23:35:09 +0000.
  1042.              <9107072325.AA01891@ccs.itd.umich.edu>
  1043. Newsgroups: fa.think-c
  1044. Lines: 11
  1045. Date: 10 Jul 91 01:01:40 GMT
  1046.  
  1047. > The receiving application does NOT have to be AppleEvent aware to
  1048. > accept the open document event.  If the application is not AE aware,
  1049. > the system will simulate an Open, and then the return from SFGetFile
  1050. > just like MultiFinder has been doing for years.
  1051.  
  1052. Well, this is certainly true when the Finder launches an application,
  1053. but we were talking about a sublaunch.  Is the Apple Event Manager
  1054. (or the Process Manager) responsible for translating an Open Document
  1055. event into the SFGetFile charade?
  1056.  
  1057. -- Russ
  1058. 
  1059. 
  1060. Path: ucivax!nagel
  1061. From: nagel@buckaroo.ics.uci.edu (Mark Nagel)
  1062. Subject: ADMIN: _Please_ use the right address...
  1063. Nntp-Posting-Host: buckaroo.ics.uci.edu
  1064. Message-ID: <287AA11F.12371@ics.uci.edu>
  1065. Newsgroups: fa.think-c
  1066. Organization: UC Irvine Department of ICS
  1067. Lines: 15
  1068. Date: 10 Jul 91 05:54:40 GMT
  1069.  
  1070. Folks, if you need to be removed from the list or have other list
  1071. administrivia to relate, _please_ send it to:
  1072.  
  1073.     think-c-request@ics.uci.edu
  1074.  
  1075. and _not_ think-c@ics.uci.edu.  The list has been pretty active
  1076. recently and most people dislike getting useless clutter in their
  1077. mailboxes.  Thanks!
  1078.  
  1079. Mark
  1080. --
  1081. Mark Nagel
  1082. UC Irvine Department of ICS   +----------------------------------------+
  1083. ARPA: nagel@ics.uci.edu       | N = 1 implies P = NP                   |
  1084. UUCP: ucbvax!ucivax!nagel     +----------------------------------------+
  1085. 
  1086. 
  1087. Path: ucivax!gateway
  1088. From: GFT_ROBERT@gsbvxb.uchicago.edu (opcode ranger)
  1089. Subject: How do you write a popup MDEF?
  1090. Message-ID: <910710185201.20600f0a@GSBACD.UCHICAGO.EDU>
  1091. Newsgroups: fa.think-c
  1092. Lines: 31
  1093. Date: 10 Jul 91 23:49:41 GMT
  1094. X-Vmsmail-To: @THINKC
  1095.  
  1096. I'm trying to write an MDEF for a popup menu and am having some difficulties.
  1097. I've gotten my MDEF written and it works fine as a popup menu, but it doesn't
  1098. handle scrolling correctly (the scrolling it should do when it runs off the
  1099. edge of the screen).
  1100.  
  1101. IM-V says "On exit, the rectangle in which the pop-up menu is to appear is
  1102. returned in menuRect.  If the menu is so large that it scrolls, then the actual
  1103. top of the menu is returned in whichItem." What does this mean?  Does it mean
  1104. I've actually got to calculate the position of the top of the screen,
  1105. subtracting the menubar if I'm on the main screen, or not if I'm not (meaning
  1106. I've got to figure out which screen I'm on)?  Then I need to return the top of
  1107. menu as the top of the screen, subtracting the menubar if necessary?   (This
  1108. seems like a lot of trouble.  Shoudn't the menu manager be able to figure this
  1109. out?)
  1110.  
  1111. IM-V also says: "When a defproc draws a pop-up menu, its scrolling information
  1112. must be placed in the global variables TopMenuItem and AtMenuBottom".  So, I
  1113. put the top menu item number in TopMenuItem and put a 1 or 0 in AtMenuBottom if
  1114. the current menu item is the last in the menu?  Do I always do this, or only if
  1115. I'm actually scrolling?
  1116.  
  1117. Any help much appreciated!
  1118.  
  1119. Robert
  1120.  
  1121. ============================================================================
  1122. = gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "Good tea.        =
  1123. =                             * all my opinions are *  Nice house."     =
  1124. =                                * mine                *  -Worf            =
  1125. ============================================================================
  1126.  
  1127. 
  1128. 
  1129. Path: ucivax!gateway
  1130. From: dave@ccs.itd.umich.edu
  1131. Subject: Re: How do you write a popup MDEF?
  1132. Message-ID: <9107111612.AA01251@ccs.itd.umich.edu>
  1133. In-Reply-To: Your message of "10 Jul 91 23:49:41 GMT."
  1134.              <910710185201.20600f0a@GSBACD.UCHICAGO.EDU>
  1135. Newsgroups: fa.think-c
  1136. Lines: 6
  1137. Date: 11 Jul 91 16:21:03 GMT
  1138.  
  1139. I don't have the answer to your questions but I do have a suggestion.
  1140. Lord of the Files (the current Developer CD), contains a folder called
  1141. "Menu Defproc 1.0.2" which is a MDEF written in MPW C.  It's pretty
  1142. easy follow, and really helped me with my MDEF.  (But I didn't have to
  1143. support scrolling or pop-ups....)
  1144.   --dave
  1145. 
  1146. 
  1147. Path: ucivax!gateway
  1148. From: beausol@milton.u.washington.edu (Raymond Beausoleil)
  1149. Subject: (none)
  1150. Message-ID: <9107141431.AA00526@milton.u.washington.edu>
  1151. Newsgroups: fa.think-c
  1152. Lines: 26
  1153. Date: 14 Jul 91 14:31:29 GMT
  1154.  
  1155. Is there any way around THINK C's 32k code segment limit for libraries? I've
  1156. been building a big "library" (using "Make") for about two years now, and it
  1157. has just grown beyond the 32k horizon. THINK C won't let me load it into any
  1158. projects, and it won't let me build a "real" library. Am I the only person
  1159. who finds this ridiculous in the age of 32-bit microprocessors?
  1160.  
  1161. Perhaps I am being naive, but the FORTRAN compilers that I have seen on the
  1162. Mac (which also have their own linkers) don't seem to need to segment code
  1163. at all. I asked a friend who is familiar with 68xxx assembly language, and
  1164. he claims that one can easily add two address registers in only slightly more
  1165. time than using the a-register plus displacement mode; this would allow
  1166. addressing throughout the entire memory space. The same approach could
  1167. be used in jumps, branches and subroutine calls (i.e., jsr). Fortran
  1168. doesn't seem to be very slowed down by this; in fact, it gives the best sieve
  1169. time of any language, I believe, and also gives very good whetstone
  1170. times (which involves lots of subroutine calls).
  1171.  
  1172. Will Apple's demand for 32-bit cleanliness allow bigger code segments in
  1173. THINK C? Am I completely missing the point here? Is my only possible solution
  1174. to break up the library into smaller segments?
  1175.  
  1176. Thanks in advance for your time and attention.
  1177.  
  1178. Regards,
  1179.  
  1180. Ray Beausoleil (beausol@u.washington.edu)
  1181. 
  1182. 
  1183. Path: ucivax!gateway
  1184. From: k044477@hobbes.kzoo.edu (Jamie McCarthy)
  1185. Subject: The THINK Reference
  1186. Message-ID: <9107150452.AA22872@hobbes.kzoo.edu>
  1187. X-Mailer: ELM [version 2.3 PL11]
  1188. Newsgroups: fa.think-c
  1189. Lines: 12
  1190. Date: 15 Jul 91 04:51:19 GMT
  1191.  
  1192. Any comments from users of the THINK(tm) Reference?  I generally prefer
  1193. paper to on-line reference, but it sounds pretty good.
  1194.  
  1195. "...THINK Reference integrates smoothly with both THINK C and THINK
  1196. Pascal" says the cover letter I got.  How smoothly?  Ideally, you could
  1197. hilite the name of a toolbox call, select a menu item, and have
  1198. information about it pop up in a window.  Or does it work differently?
  1199. --
  1200.  Jamie McCarthy            mccarthy@kzoo.edu or k044477@kzoo.edu
  1201.  Disclaimer:  it's my responsibility iff they're my words.
  1202.  There's not much point in wandering around out here, and you can't
  1203.  explore the cave without a lamp. So let's just call it a day.
  1204. 
  1205. 
  1206. Path: ucivax!gateway
  1207. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  1208. Subject: Segment size
  1209. Message-ID: <5722.9107151038@lfcs.ed.ac.uk>
  1210. Newsgroups: fa.think-c
  1211. Lines: 19
  1212. Date: 15 Jul 91 11:14:36 GMT
  1213.  
  1214. >Is there any way around THINK C's 32k code segment limit for libraries? I've
  1215. >been building a big "library" (using "Make") for about two years now, and it
  1216. >has just grown beyond the 32k horizon. THINK C won't let me load it into any
  1217. >projects, and it won't let me build a "real" library. Am I the only person
  1218. >who finds this ridiculous in the age of 32-bit microprocessors?
  1219.  
  1220. No, I find it a little silly too. My understanding is that the limit is due
  1221. to the Resource Manager handling the CODE resources. Since resources can
  1222. only be 32K in size, code segments are similarly limited, even though
  1223. there's no real architectural limit to having the segments as large as you
  1224. want. Might not be a good idea to have huge code segments if you want to
  1225. start purging and reloading them, though.
  1226.  
  1227. I personally don't have a problem with this in practice. The TCL compiles
  1228. to three libraries (Core.1, Core.2, More Classes) which I include in every
  1229. project.
  1230.  
  1231.         Nick.
  1232.  
  1233. 
  1234. 
  1235. Path: ucivax!gateway
  1236. From: k044477@hobbes.kzoo.edu (Jamie McCarthy)
  1237. Subject: Re: Segment size
  1238. Message-ID: <9107151502.AA00368@hobbes.kzoo.edu>
  1239. In-Reply-To: <5722.9107151038@lfcs.ed.ac.uk>; from "Nick Rothwell" at Jul 15, 91 11:14 am
  1240. X-Mailer: ELM [version 2.3 PL11]
  1241. Newsgroups: fa.think-c
  1242. Lines: 20
  1243. Date: 15 Jul 91 15:01:03 GMT
  1244.  
  1245. Nick Rothwell writes:
  1246. >
  1247. > No, I find it a little silly too. My understanding is that the limit is due
  1248. > to the Resource Manager handling the CODE resources. Since resources can
  1249. > only be 32K in size, code segments are similarly limited
  1250.  
  1251. Resources can be much larger. I've never found a limit; without IM
  1252. handy, I'd guess they could be the full 4 gigs.
  1253.  
  1254. The problem, I believe, is that some (ahem) compiler writers don't want
  1255. to handle the problem of >32K branches that arise when you have a >32K
  1256. code space. (No, wait, don't flame me if I'm wrong--maybe it _is_ a
  1257. MacOS restriction, I don't really know.  ;-)
  1258.  
  1259. I do know, however, that there's no good reason for limiting local
  1260. variables to 32K, which (last I checked) THINK C did.  Gr.
  1261. --
  1262.  Jamie McCarthy            mccarthy@kzoo.edu or k044477@kzoo.edu
  1263.  Disclaimer:  it's my responsibility iff they're my words.
  1264.  There is an emerald here the size of a plover's egg!
  1265. 
  1266. 
  1267. Path: ucivax!gateway
  1268. From: kent@camex.com (Kent Borg)
  1269. Subject: Re: Segment size
  1270. Message-ID: <9107151556.AA29983@relay1.UU.NET>
  1271. Newsgroups: fa.think-c
  1272. Lines: 16
  1273. Date: 15 Jul 91 15:56:54 GMT
  1274.  
  1275. Jamie McCarthy recently guessed that resources could be 4 gig.
  1276.  
  1277. I think that there is a 16-meg limit in there someplace.  I suspect
  1278. for the size of the whole resource fork (but this might have changed
  1279. with 7.0).  I can tell you that a friend of mine was once working on a
  1280. big Hypercard stack, and when sounds pushed it past 16 meg, things
  1281. broke, so they wrote an XCMD to open another file in which some of the
  1282. sounds were stored.
  1283.  
  1284. Another very real possiblity is that it was Hypercard 1.2.5 that was
  1285. choking.
  1286.  
  1287. --
  1288. Kent Borg                            internet: kent@camex.com   AOL: kent borg
  1289.                                             H:(617) 776-6899  W:(617) 426-3577
  1290. About System 7.0: "More Mac-like than the old system."  - Kim Shelton, CSX
  1291. 
  1292. 
  1293. Path: ucivax!gateway
  1294. From: jfk@eniac.seas.upenn.edu ("James F. Kennedy")
  1295. Subject: Re: segment size
  1296. Message-ID: <9107151616.AA14866@eniac.seas.upenn.edu>
  1297. X-Mailer: ELM [version 2.3 PL11]
  1298. Posted-Date: Mon, 15 Jul 91 12:16:18 EDT
  1299. Newsgroups: fa.think-c
  1300. Lines: 36
  1301. Date: 15 Jul 91 16:16:43 GMT
  1302.  
  1303.  
  1304. Nick Rothwell writes:
  1305. >
  1306. > No, I find it a little silly too. My understanding is that the limit is due
  1307. > to the Resource Manager handling the CODE resources. Since resources can
  1308. > only be 32K in size, code segments are similarly limited
  1309.  
  1310. Jamie McCarthy writes:
  1311. >
  1312. >Resources can be much larger. I've never found a limit; without IM
  1313. >handy, I'd guess they could be the full 4 gigs.
  1314. >
  1315. >The problem, I believe, is that some (ahem) compiler writers don't want
  1316. >to handle the problem of >32K branches that arise when you have a >32K
  1317. >code space. (No, wait, don't flame me if I'm wrong--maybe it _is_ a
  1318. >MacOS restriction, I don't really know.  ;-)
  1319. >
  1320. >I do know, however, that there's no good reason for limiting local
  1321. >variables to 32K, which (last I checked) THINK C did.  Gr.
  1322.  
  1323. Hmmm..I seem to remember that in pre-system 7.0, code resources were limited
  1324. to 32K because of the inability for the Resource manager to handle
  1325. CODE resources larger than 32K.  I also seem to remember something about
  1326. the way in which the mac os handles relocatable code is also a limiting
  1327. factor.  Lord knows how it is in system 7.0 - one would think they fixed
  1328. this annoying problem (the mac is the only 32 bit system that I know
  1329. of restricted to 32K code segments).
  1330.  
  1331.  I do know that global data is limited to 32K because of the A5_world
  1332. scheme....maybe this has something to do with code segments too...I'll
  1333. have to go back and take a look.
  1334.  
  1335.             James
  1336. --
  1337. James F. Kennedy        "Don't eat it if you don't like it."
  1338. jfk@seas.upenn.edu        "This is MY opinion:)"
  1339. 
  1340. 
  1341. Path: ucivax!gateway
  1342. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  1343. Subject: Re: Segment size
  1344. Message-ID: <9107151654.AA29585@bree.eng.umd.edu>
  1345. Newsgroups: fa.think-c
  1346. Lines: 1
  1347. Date: 15 Jul 91 16:55:32 GMT
  1348.  
  1349. Resources used to have a 32K limit-- that is gone.
  1350. 
  1351. 
  1352. Path: ucivax!gateway
  1353. From: rick_holzgrafe@gateway.qm.apple.com (Rick Holzgrafe)
  1354. Subject: Re- Segment size
  1355. Message-ID: <9107151745.AA02724@internal.apple.com>
  1356. Newsgroups: fa.think-c
  1357. Lines: 56
  1358. Date: 15 Jul 91 17:46:33 GMT
  1359.  
  1360.  Internet Mail          Re: Segment size
  1361. >Is there any way around THINK C's 32k code segment limit for libraries?
  1362.  
  1363. So far as I know, no. They'll need to rev their software.
  1364.  
  1365. >Am I the only person
  1366. >who finds this ridiculous in the age of 32-bit microprocessors?
  1367.  
  1368. There are reasons for the restriction, and you may or may not find them good
  1369. enough. (I know people who would give up *anything* for speed.)
  1370.  
  1371. There is no intrinsic need to limit segment size to 32K. It is usually done
  1372. that way on the Mac for two reasons. First, intra-segment references can always
  1373. be made with a 16-bit signed offset. This is faster than a 32-bit offset and
  1374. easier on compiler/linker writers.
  1375.  
  1376. Second, the jump table also has an effect on the code segment size, and this
  1377. effect *is* a restriction of the Mac OS: Any routine that is to be accessed
  1378. from *outside* its segment must be in the first 32K of its segment, because the
  1379. jump table stores the addresses of externally-referenced entry points as signed
  1380. 16-bit offsets from the beginning of the segment. (And you can't fiddle with
  1381. the structure of the jump table: the OS cares about it.)
  1382.  
  1383. These problems can be worked around. If you are willing to pay the price of
  1384. more code and slower execution, you can use 32-bit offsets for intra-segment
  1385. references. You can get around the jump table problems by making an
  1386. intra-segment jump table in the first 32K of each large segment: the table
  1387. contains 32-bit jumps to the segment's "real" entry points, and the master
  1388. (OS-supported, inter-segment) jump table can then use 16-bit offsets to the
  1389. correct entries in the intra-segment jump tables. (Another solution is to give
  1390. the developer full control over the ordering of routines in a segment
  1391. [something Think C doesn't do] and simply require that all intra-segment
  1392. references be placed within 32K of the thing referenced, and all segment entry
  1393. points be in the first 32K. Clumsy as hell, but it keeps the smaller, faster
  1394. 16-bit offsets.)
  1395.  
  1396. Similar limits apply to the total amount of global data, and the size of the
  1397. jump table itself: these are accessed as signed 16-bit offsets from A5,
  1398. negative (if memory serves) for globals, and positive for the jump table. You
  1399. can exceed the limit for globals, again by using 32-bit offsets. I know of no
  1400. reason why the same wouldn't apply to the jump table, but I've never heard of
  1401. this being done, and I'm less sure of my ground here.
  1402.  
  1403. Recent versions of MPW allow arbitrary-sized data and code segments as an
  1404. option, with the default being the old 32K limit with 16-bit offsets. I don't
  1405. know if the jump table is now allowed to exceed 32K.
  1406.  
  1407. -----------------------------------------------------
  1408. Rick Holzgrafe   rmh@apple.com   AppleLink HOLZGRAFE1
  1409.      {sun,voder,nsc,mtxinu,dual}!apple!rmh
  1410. Apple Computer, Inc.
  1411. 20525 Mariani Ave. MS: 3-PK
  1412. Cupertino, CA 95014
  1413.  
  1414.  
  1415.  
  1416. 
  1417. 
  1418. Path: ucivax!gateway
  1419. From: jbr@cblph.att.com
  1420. Subject: Problems With A Pane Sub-Class
  1421. Message-ID: <9107151232.aa09574@ics.uci.edu>
  1422. Newsgroups: fa.think-c
  1423. Original-From: cblph!jbr (j.a.brownlee)
  1424. Lines: 30
  1425. Date: 15 Jul 91 19:32:17 GMT
  1426.  
  1427. I have an interesting problem with a CPane sub-class using TC 4.0.5.  I created
  1428. a sub-class of CPane in which to plot an icon.  The class has three methods of
  1429. its own: an initialization method, a Dispose() method, and a Draw() method.
  1430. I create the Pane as being enclosed by the Window it is in.  When I bring up
  1431. a window with an icon in it, everything is happy.  However, when I Hide() the
  1432. window, then Show() it, the icon is not replotted.
  1433.  
  1434. Using the debugger, I found that my Draw() method is being called, but it
  1435. appears that the Pane is not being accumulated into the update region to be
  1436. plotted at the next update event.  I put a Refresh() call in the Draw() method,
  1437. and sure enough, my icon is plotted continuously, as expected.  Checking the
  1438. the source for CPane shows that the Show() (as documented in the manual on page
  1439. 336).  This lead me to the actual problem -- my Pane's Show() method is never
  1440. getting called.  I have several other items in the window (CButton, CCheckBox,
  1441. CPicture, etc.) and they do seem to be updated correctly.
  1442.  
  1443. After stepping through the code several times, I still don't quite understand
  1444. why my Show() method isn't being called.  It has something to do with the
  1445. DoForEach() loop through the Subviews of the Window, but I don't see what.
  1446. It seems the only call being made for my Pane is the Draw() method.  Do I need
  1447. to override some other method?
  1448.  
  1449. Has anyone else had a similar problem?  I could use any advice on how to attack
  1450. this that anyone might have.  I guess my next step is to go back to the
  1451. debugger again...
  1452.  
  1453.    ^      _   Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
  1454.   /_\  @ / `  471 E Broad St, Suite 1610, Columbus, Ohio 43215   (614) 860-7461
  1455.  /   \ | \_,  E-mail: jbr@cblph.att.com     Who pays attention to what _I_ say?
  1456.  "Scotty, we need warp drive in 3 minutes or we're all dead!" --- James T. Kirk
  1457. 
  1458. 
  1459. Path: ucivax!gateway
  1460. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  1461. Subject: Re: segment size
  1462. Message-ID: <9107161417.AA03964@bree.eng.umd.edu>
  1463. Newsgroups: fa.think-c
  1464. Lines: 6
  1465. Date: 16 Jul 91 14:17:37 GMT
  1466.  
  1467. The 32K resource limit was a 64K ROM limit-- it has been gone for years.
  1468. PC-relative branches are limited to 32K in each direction on the 68000-- that
  1469. can be gotten around, but at a high cost in efficiency.  On the 68020, it
  1470. is fairly simple to get around (branches can have a 32-bit displacement).
  1471. Global data is limited to 32K if you use the a5 scheme, but I wish compilers
  1472. would support using a different scheme.
  1473. 
  1474. 
  1475. Path: ucivax!gateway
  1476. From: carlos@wateol.uwaterloo.ca
  1477. Subject: Think Pascal in Think C
  1478. Message-ID: <9107162124.AA04432@UWaterloo.ca>
  1479. Newsgroups: fa.think-c
  1480. Lines: 12
  1481. Date: 16 Jul 91 21:36:03 GMT
  1482.  
  1483. Hi there,
  1484.  
  1485.     The subject line says it all, How can I include think pascal libraries
  1486. and/or projects in think C ? I've checked both manual (pascal and C) and
  1487. seems only possible in one direction (C lib and/or proj included in Think
  1488. pascal projs). What is the matter with Think C , why can't it handle it ?
  1489. Am I doing something wrong ?
  1490.  
  1491.  
  1492.  
  1493.                                                Carlos Bazzarella.
  1494.  
  1495. 
  1496. 
  1497. Path: ucivax!gateway
  1498. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1499. Subject: Re: Think Pascal in Think C
  1500. Message-ID: <9107171741.AA29528@chaos.cs.brandeis.edu>
  1501. In-Reply-To: carlos@wateol.uwaterloo.ca's message of 16 Jul 91 21:36:03 GMT <9107162124.AA04432@UWaterloo.ca>
  1502. Newsgroups: fa.think-c
  1503. Lines: 23
  1504. Date: 17 Jul 91 17:41:35 GMT
  1505.  
  1506.    The subject line says it all, How can I include think pascal
  1507.    libraries and/or projects in think C?
  1508.  
  1509. THINK Pascal v3.0 and later uses MPW's object file format for writing
  1510. libraries.  Because of this, THINK C users can convert Pascal
  1511. libraries by using the oConv utility that comes with THINK C.  The
  1512. only catch is that oConv doesn't know about Pascal 3.0 libraries.  So,
  1513. you must convince it that it's dealing with an MPW .o file.
  1514.  
  1515. To do this, you must first rename your Pascal library so its filename
  1516. ends in a ".o".  Next, you must change the creator type for the
  1517. library from "PJMM" to "MPS ".  You can use ResEdit or some other
  1518. utility to change a file's type.
  1519.  
  1520. Note that oConv can't handle multisegment libraries, so if you have a
  1521. library with more than 32K of code, you'll have to import it using one
  1522. library for each segment.
  1523.  
  1524.     -phil
  1525. ----
  1526.    Phil Shapiro                           Technical Support Analyst
  1527.    Language Products Group                     Symantec Corporation
  1528.         Internet: phils@chaos.cs.brandeis.edu
  1529. 
  1530. 
  1531. Path: ucivax!gateway
  1532. From: johnsone@uxh.cso.uiuc.edu ("Erik A. Johnson")
  1533. Subject: StopAlert() behavior ok w/Debugger, not ok without? help!
  1534. Message-ID: <199107180140.AA21784@uxh.cso.uiuc.edu>
  1535. Newsgroups: fa.think-c
  1536. Lines: 14
  1537. Date: 18 Jul 91 01:41:09 GMT
  1538.  
  1539. I have a project in which StopAlert() is called.  If I have the THINK C
  1540. Debugger on, the Alert works fine.  But without the debugger, the stopIcon
  1541. doesn't show up and the default-button-outline around the OK button isn't
  1542. drawn.
  1543.  
  1544. Any ideas?  Thanks.
  1545.  
  1546.  
  1547. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  1548. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  1549. Graduate Student         \--------------------------------------------\     |
  1550. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  1551. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  1552.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  1553. 
  1554. 
  1555. Path: ucivax!gateway
  1556. From: johnsone@uxh.cso.uiuc.edu ("Erik A. Johnson")
  1557. Subject: Re: StopAlert() behavior ok w/Debugger, not ok without? help!
  1558. Message-ID: <199107180548.AA28623@uxh.cso.uiuc.edu>
  1559. Newsgroups: fa.think-c
  1560. Lines: 16
  1561. Date: 18 Jul 91 05:48:52 GMT
  1562.  
  1563. Sorry all, I found a work-around.  The StopAlert() I was trying to display
  1564. was at the very beginning of my program, before I had gone through my
  1565. Event loop.  I remembered seeing something sometime about dialogs having
  1566. problems at the very beginning of a code unless WaitNextEvent() is called
  1567. a couple of times before.
  1568.  
  1569. Well, that fixed it, but I'm still curious as to why this is the case.
  1570. Any ideas?
  1571.  
  1572.  
  1573. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  1574. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  1575. Graduate Student         \--------------------------------------------\     |
  1576. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  1577. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  1578.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  1579. 
  1580. 
  1581. Path: ucivax!gateway
  1582. From: jim@fpr.com ("James E. O'Dell")
  1583. Subject: Mac/gnuucp under System 7.0
  1584. Message-ID: <9107181228.AA15329@uu.psi.com>
  1585. Newsgroups: fa.think-c
  1586. Reply-To: "James E. O'Dell" <jim@fpr.com>
  1587. Organization: Fort Pond Research
  1588. Lines: 24
  1589. Date: 18 Jul 91 12:31:34 GMT
  1590.  
  1591. >Equipment: Mac Plus
  1592. >                  4 megs of ram
  1593. >
  1594. >I am running 4.3 gnu uucp, I just upgraded to system 7 and I when I
  1595. >run the uucico program, and the window is very large (It can't fit on
  1596. >my mac plus).
  1597. >It worked fine when I was using system 6.0.7.  I tried to recomple it
  1598. >with the system 7 headers and libraries from symantec but no go.
  1599. >Have other people reported this bug??  Do you have a fix for it???
  1600.  
  1601. I personally have not upgraded to system 7.0 yet because so much of my
  1602. environment needs upgrading...
  1603.  
  1604. However, other users have reported that under system 7.0 Mac/gnuucp
  1605. worked O.K. It may be that they have not tried on small monitor Mac's.
  1606.  
  1607. It could also be an incompatibility between the Symantex Unix console
  1608. library and System 7.0 Anyone on the THINK-C mailing list know
  1609. about this?
  1610.  
  1611. Thanks,
  1612. Jim
  1613.  
  1614.  
  1615. 
  1616. 
  1617. Path: ucivax!gateway
  1618. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1619. Subject: StopAlert() behavior ok w/Debugger, not ok without? help!
  1620. Message-ID: <9107181345.AA09736@chaos.cs.brandeis.edu>
  1621. In-Reply-To: "Erik A. Johnson"'s message of 18 Jul 91 05:48:52 GMT <199107180548.AA28623@uxh.cso.uiuc.edu>
  1622. Newsgroups: fa.think-c
  1623. Lines: 21
  1624. Date: 18 Jul 91 13:45:34 GMT
  1625.  
  1626. Erik wrote:
  1627.    Sorry all, I found a work-around.  The StopAlert() I was trying to
  1628.    display was at the very beginning of my program, before I had gone
  1629.    through my Event loop.  I remembered seeing something sometime
  1630.    about dialogs having problems at the very beginning of a code
  1631.    unless WaitNextEvent() is called a couple of times before.
  1632.  
  1633.    Well, that fixed it, but I'm still curious as to why this is the
  1634.    case.  Any ideas?
  1635.  
  1636. The THINK C Debugger uses a WaitNextEvent() call that it executes in
  1637. your heap to suspend your app and bring it to the foreground, in order
  1638. to force a context switch.  This occurs on breakpoints and
  1639. watchpoints, or if you single-step through your code.  This call to
  1640. WaitNextEvent probably lets the dialog manager do its bit.
  1641.  
  1642.     -phil
  1643. ----
  1644.    Phil Shapiro                           Technical Support Analyst
  1645.    Language Products Group                     Symantec Corporation
  1646.         Internet: phils@chaos.cs.brandeis.edu
  1647. 
  1648. 
  1649. Path: ucivax!gateway
  1650. From: ephraim@think.com (Ephraim Vishniac)
  1651. Subject: Re: Mac/gnuucp under System 7.0
  1652. Message-ID: <9107181408.AA06053@leander.think.com>
  1653. In-Reply-To: Your message of "18 Jul 91 12:31:34 GMT."
  1654.              <9107181228.AA15329@uu.psi.com>
  1655. Newsgroups: fa.think-c
  1656. Lines: 18
  1657. Date: 18 Jul 91 14:08:38 GMT
  1658.  
  1659.  
  1660.    From: "James E. O'Dell" <jim@fpr.com>
  1661.    Date: 18 Jul 91 12:31:34 GMT
  1662.  
  1663.    >I am running 4.3 gnu uucp, I just upgraded to system 7 and I when I
  1664.    >run the uucico program, and the window is very large (It can't fit on
  1665.    >my mac plus).
  1666.  
  1667.    It could also be an incompatibility between the Symantex Unix console
  1668.    library and System 7.0 Anyone on the THINK-C mailing list know
  1669.    about this?
  1670.  
  1671. It might be wider spread than that. Somebody from BCS posted recently
  1672. in one of the Mac groups that BiPlane 2.0, a shareware spreadsheet,
  1673. opens an extremely (infinitely?) wide window by default on his system.
  1674. I ran it on my system, saw no problem, and compared notes with him.
  1675. He was running 7.0, I'm running 6.0.5.
  1676.  
  1677. 
  1678. 
  1679. Path: ucivax!gateway
  1680. From: iron@imag.fr (Francois Menneteau)
  1681. Subject: Re: segment size
  1682. Message-ID: <9107191026.AA10711@imag.imag.fr>
  1683. In-Reply-To: "James F. Kennedy"'s message as of Jul 15, 16:16.
  1684. Newsgroups: fa.think-c
  1685. Organization: IMAG Institute, University of Grenoble
  1686. Lines: 17
  1687. Date: 19 Jul 91 10:25:12 GMT
  1688.  
  1689. Dans votre courrier du 15 Jul vous ecrivez :
  1690. >
  1691. >Nick Rothwell writes:
  1692.  
  1693. >Hmmm..I seem to remember that in pre-system 7.0, code resources were limited
  1694. >to 32K because of the inability for the Resource manager to handle
  1695. >CODE resources larger than 32K.  I also seem to remember something about
  1696.  
  1697. Wrong ! Look at the 64K, and the 600K PCODE resources in Word 4.0. I Know
  1698. it because my resources dump/disass/editor crashed the first time I open
  1699. them. Now it works fine...
  1700.  
  1701. --
  1702. Francois Menneteau ()   __|||||__   () "... I had their lives in my hands
  1703. ================== ()    /O   O\    () their fate their fortune in my visions
  1704. iron@imag.fr       ()    - .|. -    () No one believed in my true prophecy
  1705. ================== ()     \=^=/     () And now it's too late."  (Iron Maiden)
  1706. 
  1707. 
  1708. Path: ucivax!gateway
  1709. From: rudman@mondo.engin.umich.edu
  1710. Subject: THINK C addition request
  1711. Message-ID: <9107191601.AA29248@mondo.engin.umich.edu>
  1712. Newsgroups: fa.think-c
  1713. Lines: 9
  1714. Date: 19 Jul 91 15:02:20 GMT
  1715.  
  1716. Please add me to this discussion group.
  1717. Thanks.
  1718.  
  1719.  
  1720. //Dan
  1721. The University of Michigan
  1722. Computer-Aided Engineering Network
  1723. Macintosh Systems Administration
  1724.  
  1725. 
  1726. 
  1727. Path: ucivax!gateway
  1728. From: pixar!planetex!flip@ucbvax.berkeley.edu (Flip Phillips)
  1729. Subject: Re: Mac/gnuucp under System 7.0
  1730. Message-ID: <9107221634.AA08338@pixar>
  1731. X-Mailer: Mail Reader (2.0b8 4jun91)
  1732. Newsgroups: fa.think-c
  1733. Reply-To: pixar!planetex!flip@ucbvax.berkeley.edu
  1734. Organization: Planet Ex
  1735. Lines: 26
  1736. Date: 22 Jul 91 17:07:58 GMT
  1737.  
  1738. On Thu, 18 Jul 91, pixar!ucbvax!fpr.com!jim (James E. O'Dell) wrote:
  1739. >>Equipment: Mac Plus
  1740. >>                  4 megs of ram
  1741. >>
  1742. >>I am running 4.3 gnu uucp, I just upgraded to system 7 and I when I
  1743. >>run the uucico program, and the window is very large (It can't fit on
  1744. >>my mac plus).
  1745. >>It worked fine when I was using system 6.0.7.  I tried to recomple it
  1746. >>with the system 7 headers and libraries from symantec but no go.
  1747. >>Have other people reported this bug??  Do you have a fix for it???
  1748. [...]
  1749. >It could also be an incompatibility between the Symantex Unix console
  1750. >library and System 7.0 Anyone on the THINK-C mailing list know
  1751. >about this?
  1752.  
  1753.  
  1754. Which version of the c-compiler? There have been many mutations of the
  1755. compiler lately, (well, OK 2 or 3), 4.0.5 is the most recent one I can find,
  1756. has some fixes for 7.0 compatible code generation. Give that a shot if you
  1757. haven't.
  1758.  
  1759. -- flip
  1760.  
  1761.  
  1762. Flip Phillips
  1763. Planet Ex
  1764. 
  1765. 
  1766. Path: ucivax!gateway
  1767. From: kw1r+@andrew.cmu.edu (Kevin Whitley)
  1768. Subject: opening serial ports
  1769. Message-ID: <McWmaM200Uh_Q30Fwn@andrew.cmu.edu>
  1770. Newsgroups: fa.think-c
  1771. Lines: 11
  1772. Date: 22 Jul 91 18:55:46 GMT
  1773.  
  1774.  
  1775. It used to be, in the stdio libraries of THINK C version 3.0 & earlier,
  1776. that one could open serial ports by opening "files" names .AOut, .AIn
  1777. .BOut .BIn.  In the stdio libraries that came with version 4.0 this no
  1778. longer works.  Is there a way to open the serial ports with the stdio
  1779. libraries?
  1780.  
  1781. Kevin Whitley
  1782. kw1r@andrew.cmu.edu
  1783.  
  1784.  
  1785. 
  1786. 
  1787. Path: ucivax!gateway
  1788. From: root@csri.toronto.edu (Operator)
  1789. Subject: Forwarding: dropped mail
  1790. Message-ID: <91Jul22.172429edt.614@yonge.csri.toronto.edu>
  1791. Newsgroups: fa.think-c
  1792. Lines: 27
  1793. Date: 22 Jul 91 21:25:08 GMT
  1794.  
  1795. This message was not delivered due to problems at our site. It is being resent.
  1796. The following is a copy of the message:
  1797.  
  1798. Received: from ics.uci.edu (-:ics.uci.edu:-) by yonge.csri.toronto.edu via TCP with SMTP id AA27989; Mon, 15 Jul 91 02:18:52 EDT
  1799. Received: from ics.uci.edu by ics.uci.edu id aa14683; 14 Jul 91 21:53 PDT
  1800. Received: from USENET by ics.uci.edu id aa14665; 14 Jul 91 21:51 PDT
  1801. From: Jamie McCarthy <k044477@hobbes.kzoo.edu>
  1802. Subject: The THINK Reference
  1803. Message-Id: <9107150452.AA22872@hobbes.kzoo.edu>
  1804. X-Mailer: ELM [version 2.3 PL11]
  1805. Newsgroups: fa.think-c
  1806. Date: 15 Jul 91 04:51:19 GMT
  1807. To: think-c@ics.uci.edu
  1808.  
  1809. Any comments from users of the THINK(tm) Reference?  I generally prefer
  1810. paper to on-line reference, but it sounds pretty good.
  1811.  
  1812. "...THINK Reference integrates smoothly with both THINK C and THINK
  1813. Pascal" says the cover letter I got.  How smoothly?  Ideally, you could
  1814. hilite the name of a toolbox call, select a menu item, and have
  1815. information about it pop up in a window.  Or does it work differently?
  1816. --
  1817.  Jamie McCarthy            mccarthy@kzoo.edu or k044477@kzoo.edu
  1818.  Disclaimer:  it's my responsibility iff they're my words.
  1819.  There's not much point in wandering around out here, and you can't
  1820.  explore the cave without a lamp. So let's just call it a day.
  1821.  
  1822. 
  1823. 
  1824. Path: ucivax!gateway
  1825. From: root@csri.toronto.edu (Operator)
  1826. Subject: Forwarding: dropped mail
  1827. Message-ID: <91Jul22.173356edt.629@yonge.csri.toronto.edu>
  1828. Newsgroups: fa.think-c
  1829. Lines: 52
  1830. Date: 22 Jul 91 21:34:33 GMT
  1831.  
  1832. This message was not delivered due to problems at our site. It is being resent.
  1833. The following is a copy of the message:
  1834.  
  1835. Received: from ics.uci.edu (-:ics.uci.edu:-) by yonge.csri.toronto.edu via TCP with SMTP id AA03906; Mon, 15 Jul 91 14:38:34 EDT
  1836. Received: from ics.uci.edu by ics.uci.edu id aa16360; 15 Jul 91 9:18 PDT
  1837. Received: from USENET by ics.uci.edu id aa16318; 15 Jul 91 9:16 PDT
  1838. From: "James F. Kennedy" <jfk@eniac.seas.upenn.edu>
  1839. Subject: Re: segment size
  1840. Message-Id: <9107151616.AA14866@eniac.seas.upenn.edu>
  1841. X-Mailer: ELM [version 2.3 PL11]
  1842. Posted-Date: Mon, 15 Jul 91 12:16:18 EDT
  1843. Newsgroups: fa.think-c
  1844. Date: 15 Jul 91 16:16:43 GMT
  1845. To: think-c@ics.uci.edu
  1846.  
  1847.  
  1848. Nick Rothwell writes:
  1849. >
  1850. > No, I find it a little silly too. My understanding is that the limit is due
  1851. > to the Resource Manager handling the CODE resources. Since resources can
  1852. > only be 32K in size, code segments are similarly limited
  1853.  
  1854. Jamie McCarthy writes:
  1855. >
  1856. >Resources can be much larger. I've never found a limit; without IM
  1857. >handy, I'd guess they could be the full 4 gigs.
  1858. >
  1859. >The problem, I believe, is that some (ahem) compiler writers don't want
  1860. >to handle the problem of >32K branches that arise when you have a >32K
  1861. >code space. (No, wait, don't flame me if I'm wrong--maybe it _is_ a
  1862. >MacOS restriction, I don't really know.  ;-)
  1863. >
  1864. >I do know, however, that there's no good reason for limiting local
  1865. >variables to 32K, which (last I checked) THINK C did.  Gr.
  1866.  
  1867. Hmmm..I seem to remember that in pre-system 7.0, code resources were limited
  1868. to 32K because of the inability for the Resource manager to handle
  1869. CODE resources larger than 32K.  I also seem to remember something about
  1870. the way in which the mac os handles relocatable code is also a limiting
  1871. factor.  Lord knows how it is in system 7.0 - one would think they fixed
  1872. this annoying problem (the mac is the only 32 bit system that I know
  1873. of restricted to 32K code segments).
  1874.  
  1875.  I do know that global data is limited to 32K because of the A5_world
  1876. scheme....maybe this has something to do with code segments too...I'll
  1877. have to go back and take a look.
  1878.  
  1879.             James
  1880. --
  1881. James F. Kennedy        "Don't eat it if you don't like it."
  1882. jfk@seas.upenn.edu        "This is MY opinion:)"
  1883.  
  1884. 
  1885. 
  1886. Path: ucivax!gateway
  1887. From: root@csri.toronto.edu (Operator)
  1888. Subject: Forwarding: dropped mail
  1889. Message-ID: <91Jul22.173524edt.647@yonge.csri.toronto.edu>
  1890. Newsgroups: fa.think-c
  1891. Lines: 45
  1892. Date: 22 Jul 91 21:36:03 GMT
  1893.  
  1894. This message was not delivered due to problems at our site. It is being resent.
  1895. The following is a copy of the message:
  1896.  
  1897. Received: from ics.uci.edu (-:ics.uci.edu:-) by yonge.csri.toronto.edu via TCP with SMTP id AA06108; Mon, 15 Jul 91 18:33:48 EDT
  1898. Received: from ics.uci.edu by ics.uci.edu id aa09625; 15 Jul 91 12:34 PDT
  1899. Received: from USENET by ics.uci.edu id aa09608; 15 Jul 91 12:32 PDT
  1900. From: jbr@cblph.att.com
  1901. Subject: Problems With A Pane Sub-Class
  1902. Message-Id: <9107151232.aa09574@ics.uci.edu>
  1903. Newsgroups: fa.think-c
  1904. Original-From: cblph!jbr (j.a.brownlee)
  1905. Date: 15 Jul 91 19:32:17 GMT
  1906. To: think-c@ics.uci.edu
  1907.  
  1908. I have an interesting problem with a CPane sub-class using TC 4.0.5.  I created
  1909. a sub-class of CPane in which to plot an icon.  The class has three methods of
  1910. its own: an initialization method, a Dispose() method, and a Draw() method.
  1911. I create the Pane as being enclosed by the Window it is in.  When I bring up
  1912. a window with an icon in it, everything is happy.  However, when I Hide() the
  1913. window, then Show() it, the icon is not replotted.
  1914.  
  1915. Using the debugger, I found that my Draw() method is being called, but it
  1916. appears that the Pane is not being accumulated into the update region to be
  1917. plotted at the next update event.  I put a Refresh() call in the Draw() method,
  1918. and sure enough, my icon is plotted continuously, as expected.  Checking the
  1919. the source for CPane shows that the Show() (as documented in the manual on page
  1920. 336).  This lead me to the actual problem -- my Pane's Show() method is never
  1921. getting called.  I have several other items in the window (CButton, CCheckBox,
  1922. CPicture, etc.) and they do seem to be updated correctly.
  1923.  
  1924. After stepping through the code several times, I still don't quite understand
  1925. why my Show() method isn't being called.  It has something to do with the
  1926. DoForEach() loop through the Subviews of the Window, but I don't see what.
  1927. It seems the only call being made for my Pane is the Draw() method.  Do I need
  1928. to override some other method?
  1929.  
  1930. Has anyone else had a similar problem?  I could use any advice on how to attack
  1931. this that anyone might have.  I guess my next step is to go back to the
  1932. debugger again...
  1933.  
  1934.    ^      _   Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
  1935.   /_\  @ / `  471 E Broad St, Suite 1610, Columbus, Ohio 43215   (614) 860-7461
  1936.  /   \ | \_,  E-mail: jbr@cblph.att.com     Who pays attention to what _I_ say?
  1937.  "Scotty, we need warp drive in 3 minutes or we're all dead!" --- James T. Kirk
  1938.  
  1939. 
  1940. 
  1941. Path: ucivax!gateway
  1942. From: root@csri.toronto.edu (Operator)
  1943. Subject: Forwarding: dropped mail
  1944. Message-ID: <91Jul22.173527edt.648@yonge.csri.toronto.edu>
  1945. Newsgroups: fa.think-c
  1946. Lines: 20
  1947. Date: 22 Jul 91 21:36:03 GMT
  1948.  
  1949. This message was not delivered due to problems at our site. It is being resent.
  1950. The following is a copy of the message:
  1951.  
  1952. Received: from ics.uci.edu (-:ics.uci.edu:-) by yonge.csri.toronto.edu via TCP with SMTP id AA25514; Thu, 11 Jul 91 15:38:45 EDT
  1953. Received: from ics.uci.edu by ics.uci.edu id aa06771; 11 Jul 91 9:24 PDT
  1954. Received: from USENET by ics.uci.edu id aa06748; 11 Jul 91 9:21 PDT
  1955. From: dave@ccs.itd.umich.edu
  1956. Subject: Re: How do you write a popup MDEF?
  1957. Message-Id: <9107111612.AA01251@ccs.itd.umich.edu>
  1958. Newsgroups: fa.think-c
  1959. Date: 11 Jul 91 16:21:03 GMT
  1960. To: think-c@ics.uci.edu
  1961.  
  1962. I don't have the answer to your questions but I do have a suggestion.
  1963. Lord of the Files (the current Developer CD), contains a folder called
  1964. "Menu Defproc 1.0.2" which is a MDEF written in MPW C.  It's pretty
  1965. easy follow, and really helped me with my MDEF.  (But I didn't have to
  1966. support scrolling or pop-ups....)
  1967.   --dave
  1968.  
  1969. 
  1970. 
  1971. Path: ucivax!gateway
  1972. From: HUFF@mcclb0.med.nyu.edu ("Edward J. Huff")
  1973. Subject: 32k limits
  1974. Message-ID: <01G8HR8ZUNQO0001V9@MCCLB0.MED.NYU.EDU>
  1975. X-VMS-Cc: HUFF
  1976. Newsgroups: fa.think-c
  1977. X-VMS-To: IN%"think-c@ics.uci.edu"
  1978. Lines: 9
  1979. Date: 23 Jul 91 15:11:40 GMT
  1980. X-Envelope-to: think-c@ics.uci.edu
  1981. X-Organization: NYU Medical Center, 550 First Ave., New York
  1982.  
  1983. MPW 3.2 has a "huge" model which lifts the 32k limits on data.
  1984. The problem arises from the desire to use 4 byte instructions to
  1985. reference global data.  Any given compiled module must decide at
  1986. compile time how long each instruction is.  If you want to have
  1987. >32k global data, you must use 6 byte instructions for ALL references
  1988. to global data.  I don't know if the 32k code segment limit will also
  1989. be removed, but the similar effect is you have to use 6 byte jump
  1990. instructions (not available on 68000 in PC relative mode) for all
  1991. references to modules not in the present compilation.
  1992. 
  1993. 
  1994. Path: ucivax!gateway
  1995. From: fleabag@athena.mit.edu
  1996. Subject: two TCL design q's
  1997. Message-ID: <9107232005.AA09680@e40-008-6.MIT.EDU>
  1998. Newsgroups: fa.think-c
  1999. Lines: 33
  2000. Date: 23 Jul 91 20:50:04 GMT
  2001.  
  2002.  
  2003.  
  2004. hi all,
  2005.  
  2006. i have two design questions about the think class library:
  2007.  
  2008.     (1)  why is it that an "Offset" message to a pane doesn't
  2009.          cause its hEncl & vEncl to change?  if the pane moves
  2010.          within its enclosure (ie, the reason for an Offset msg),
  2011.          then why don't the variables that track its location
  2012.          within its enclosure change also?
  2013.  
  2014.     (2)  why does the "FindSubview"/"View_Contains" duo look
  2015.          at a subview's "wantsClicks" variable only AFTER the
  2016.          subview is found?
  2017.  
  2018. to clarify #2:  i have two types of subviews in my pane.  one type fills
  2019. its frame with data and always wants clicks.  another type fills only
  2020. part of its frame, and only sometimes wants clicks.  a situation can
  2021. arise when the "sparse" subview's frame overlaps the "full" subview's
  2022. frame.  no one notices, since the data in the "full" subview" is not
  2023. obscured.  when the main pane goes to check its subviews for a dispatch-
  2024. click, it finds only the sparse subview, never the full one, even when
  2025. the sparse subview doesn't want clicks.
  2026.  
  2027. i've found workarounds for both of these problems. any ideas on why
  2028. they were implemented this way to begin with??
  2029.  
  2030.  
  2031. :jeff bellsey
  2032.  
  2033. fleabag@athena.mit.edu
  2034.  
  2035. 
  2036. 
  2037. Path: ucivax!gateway
  2038. From: Chris_McNeil@macsmtp.csd.unb.ca (Chris McNeil)
  2039. Subject: ADSP & Launching questions
  2040. Message-ID: <9107231927.aa05434@ics.uci.edu>
  2041. X-Mailer: QuickMail/SMTP interface.
  2042. Newsgroups: fa.think-c
  2043. Lines: 7
  2044. Date: 24 Jul 91 02:27:59 GMT
  2045.  
  2046. Where can I get information on writing programs that use ADSP. Also how do I
  2047. launch a program from another program using Think C. ( does anyone have some
  2048. code that does this that they would share ?)
  2049.  
  2050. Thanks
  2051. Chris McNeil
  2052. cjm@unb.ca
  2053. 
  2054. 
  2055. Path: ucivax!gateway
  2056. From: jim@fpr.com ("James E. O'Dell")
  2057. Subject: RE: Re: Mac/gnuucp under System 7.0
  2058. Message-ID: <9107240238.AA24008@uu.psi.com>
  2059. Newsgroups: fa.think-c
  2060. Reply-To: "James E. O'Dell" <jim@fpr.com>
  2061. Organization: Fort Pond Research
  2062. Lines: 24
  2063. Date: 24 Jul 91 02:41:16 GMT
  2064.  
  2065. >>>I am running 4.3 gnu uucp, I just upgraded to system 7 and I when I
  2066. >>>run the uucico program, and the window is very large (It can't fit on
  2067. >>>my mac plus).
  2068. >>>It worked fine when I was using system 6.0.7.  I tried to recomple it
  2069. >>>with the system 7 headers and libraries from symantec but no go.
  2070. >>>Have other people reported this bug??  Do you have a fix for it???
  2071. >[...]
  2072. >>It could also be an incompatibility between the Symantex Unix console
  2073. >>library and System 7.0 Anyone on the THINK-C mailing list know
  2074. >>about this?
  2075. >
  2076. >
  2077. >Which version of the c-compiler? There have been many mutations of the
  2078. >compiler lately, (well, OK 2 or 3), 4.0.5 is the most recent one I can find,
  2079. >has some fixes for 7.0 compatible code generation. Give that a shot if you
  2080. >haven't.
  2081.  
  2082. I got mail from johnj saying that he had install system 7.0 "wrong" and
  2083. when he reinstalled it the problem disappeared. I dying to know
  2084. how he installed it "wrong"
  2085.  
  2086. Jim
  2087.  
  2088.  
  2089. 
  2090. 
  2091. Path: ucivax!gateway
  2092. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2093. Subject: two TCL design q's
  2094. Message-ID: <9107241824.AA03777@chaos.cs.brandeis.edu>
  2095. In-Reply-To: fleabag@athena.mit.edu's message of 23 Jul 91 20:50:04 GMT <9107232005.AA09680@e40-008-6.MIT.EDU>
  2096. Newsgroups: fa.think-c
  2097. Lines: 24
  2098. Date: 24 Jul 91 18:50:52 GMT
  2099.  
  2100.        (1)  why is it that an "Offset" message to a pane doesn't
  2101.         cause its hEncl & vEncl to change?
  2102.  
  2103. This is a bug in the TCL, and it will be fixed in the next major
  2104. release.
  2105.  
  2106.        (2)  why does the "FindSubview"/"View_Contains" duo look
  2107.         at a subview's "wantsClicks" variable only AFTER the
  2108.         subview is found?
  2109.  
  2110. If you have a non clickable pane obscuring (covering visually) a
  2111. clickable one, then you won't ever get click events for the obscured
  2112. clickable pane.  This is, I guess, a shortcoming in the TCL for apps
  2113. that have layered panes.  Offhand, I don't know why we do it the way
  2114. we do, and I can't see anything wrong with modifing CView::FindSubview
  2115. (and changing View_Contains) so that it checks for clickability at the
  2116. same time it checks for visibility.  I'll pass this one on as a
  2117. suggestion for the TCL.
  2118.  
  2119.     -phil
  2120. ----
  2121.    Phil Shapiro                           Technical Support Analyst
  2122.    Language Products Group                     Symantec Corporation
  2123.         Internet: phils@chaos.cs.brandeis.edu
  2124. 
  2125. 
  2126. Path: ucivax!gateway
  2127. From: evensen@husc.harvard.edu
  2128. Subject: QuickDraw32 bit
  2129. Message-ID: <9107251528.AA26399@husc10>
  2130. Newsgroups: fa.think-c
  2131. Lines: 16
  2132. Date: 25 Jul 91 15:28:56 GMT
  2133.  
  2134. Friends,
  2135.  
  2136. I'm trying to use offscreen GWorlds of 32 bit quick draw for some
  2137. animation but ran into a snag.  The QuickDraw32Bit.h file from the uci
  2138. archive does not have a definition for the routine GetGWorldPixMap.
  2139. Now I guess I could figure how to get at this field of the GWorld
  2140. record but for "future compatibility" I would prefer to use this
  2141. function.  Is there a revised QuickDraw32Bit.h which has this defined?
  2142.  
  2143. On a related note, there seems to be a typographical type error in the
  2144. aforementioned header file.  The routine which is called UnlockPixels
  2145. in IM VI is called UnLockPixels in the header.
  2146.  
  2147. Thanks in advance
  2148.  
  2149. --Erik
  2150. 
  2151. 
  2152. Path: ucivax!gateway
  2153. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  2154. Subject: Re:  QuickDraw32 bit
  2155. Message-ID: <9107251828.AA08397@jolt.eng.umd.edu>
  2156. Newsgroups: fa.think-c
  2157. Lines: 5
  2158. Date: 25 Jul 91 18:28:55 GMT
  2159.  
  2160. GetGWorldPixMap?  It's not in my header files either.  What is it supposed
  2161. to do?  I've got a GetPixBaseAddr:
  2162. pascal Ptr GetPixBaseAddr (PixMapHandle pm)
  2163.     = {0x700F,0xAB1D};
  2164.  
  2165. 
  2166. 
  2167. Path: ucivax!gateway
  2168. From: brian@cirrus.com
  2169. Subject: Resedit example editor code in Think C
  2170. Message-ID: <9107252027.AA19882@ss230.cirrus.com>
  2171. Newsgroups: fa.think-c
  2172. Lines: 13
  2173. Date: 25 Jul 91 20:29:37 GMT
  2174.  
  2175. Has anyone tried to convert the example code for writing a Resedit
  2176. editor or picker from MPW into Think C? The hard part seems to be the
  2177. assembly routines. I tried converting them into inline assembler, but
  2178. one of the files (RSSC.a) has a jump table structure, with things like
  2179. dc.w routine1-routine2
  2180. and Think C doesn't allow this.
  2181.  
  2182. -- Brian
  2183. _____________________________________________________
  2184. Brian Feinberg <brian@cirrus.COM>
  2185. UUCP:  oliveb!cirrusl!brian
  2186. CIS:   73617,2470
  2187. AOL:   BrianF
  2188. 
  2189. 
  2190. Path: ucivax!gateway
  2191. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2192. Subject: QuickDraw32 bit
  2193. Message-ID: <9107252156.AA19338@chaos.cs.brandeis.edu>
  2194. In-Reply-To: evensen@husc.harvard.edu's message of 25 Jul 91 15:28:56 GMT <9107251528.AA26399@husc10>
  2195. Newsgroups: fa.think-c
  2196. Lines: 14
  2197. Date: 25 Jul 91 21:56:11 GMT
  2198.  
  2199. Here's the glue for PixMapHandle:
  2200.  
  2201. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  2202.     = {0x203C,0x0004,0x0017,0xAB1D};
  2203.  
  2204. Re: UnlockPixels vs. UnLockPixels; it's not a typo, Apple just changed
  2205. it between 32 bit QuickDraw and System 7.0.  It's the same trap.
  2206.  
  2207.     -phil
  2208. ----
  2209.    Phil Shapiro                           Technical Support Analyst
  2210.    Language Products Group                     Symantec Corporation
  2211.         Internet: phils@chaos.cs.brandeis.edu
  2212.  
  2213. 
  2214. 
  2215. Path: ucivax!gateway
  2216. From: tkunze@mvax.kgw.tu-berlin.de (Tobias Kunze)
  2217. Subject: (none)
  2218. Message-ID: <9107260110.AA13391@mvax.kgw.tu-berlin.de>
  2219. Newsgroups: fa.think-c
  2220. X400-Received: by /PRMD=tu-berlin/ADMD=dbp/C=de/;
  2221.     Relayed; 26 Jul 91 03:10:18+0200
  2222. Lines: 66
  2223. Date: 26 Jul 91 01:12:17 GMT
  2224.  
  2225. Sound Manager Clicks
  2226.  
  2227. I'm working on a project which simulates most of the features of common Unix
  2228. computer music synthesis systems, including the basic capability of reading
  2229. large soundfiles from disk. Sounds fine so far, if I could figure out where
  2230. these little 'clicks' are from. Thus I spent two weeks to trace it down, but I
  2231. couldn't find anything wrong with my code.
  2232. To be more precise: I repeatedly read 22200 16-bit samples from the disk,
  2233. convert them to 8-bit offset format (0x00-0xFF), attach a standard sound header
  2234. to the converted buffers in memory, and finally send each of them to the Sound
  2235. Manager via SndDoCommand(...,&mybufferCmd,...). Of course, all channel setup
  2236. and release is done, too.
  2237. The 'click' always (actually: 'sometimes', see later on) occurs between every
  2238. two buffers.
  2239. Now the strange thing: I've tested the integrity of the buffers just at the
  2240. point where they are sent to the sampledSynth from within Macsbug 6.2 (in fact,
  2241. I logged the output to a file, extracted all buffers, and concatenated them
  2242. into one single file which I could open with SoundEdit and listen to) and they
  2243. turned out to be perfectly clean.
  2244. Let me emphasize that this is in no way the old problem with the Sound Driver
  2245. discussed somewhere in TechNote #19 (+/- 10). I have no idea, what's going
  2246. wrong.
  2247. This problem persists on my SE/30 regardless whether I'm running 6.0.4-6 or
  2248. 6.0.7/7.0 and seems to be fully independent of how much Inits are loaded, or
  2249. whether Multifinder is running or not.
  2250.  
  2251. Now the bad thing: It seems to me now that this is a *undocumented* bug in the
  2252. Sound Manager... Why?
  2253.         -> I downloaded TcpPlay (written by Bill Stafford, Malcolm Slaney, and
  2254.            Richard Tsoi, Advanced Technology Group), which basically does it
  2255.            the same way, and tested it on my soundfiles. Guess, what...
  2256.               dzzz 'click' dzzz 'click' dzzz 'click'...
  2257.         -> Funny enough, this seemed not to happen with the soundfiles they
  2258.            provided!
  2259.         -> Confused by that, I finally found out, that Apple is *nearly* right
  2260.            if they claim: 'playing two or more buffers end-to-end is guaranteed
  2261.            to sound just as though the buffers had been concatenated into a
  2262.            longer buffer...' (IM V-485, similar in J. Reekes' interim chapter),
  2263.            the only caveat being: there's *always* a click. You just normally
  2264.            wouldn't hear it if your soundfiles contain  non-sinusoidal signals,
  2265.            e.g., speech, recorded music, other noisy signals, or simply
  2266.            silence.
  2267.            However,I managed to notice it even on a soundfile containing
  2268.            nothing but white noise by decreasing the playback sample rate to
  2269.            some silly value as 1000 Hz.
  2270.  
  2271. Nevertheless, I still hesitate to end up with this. In fact, as I am not a
  2272. experienced programmer, I can't really believe that I'm right and Apple is -at
  2273. least partially- wrong. Also, as I *have* to find a way to circumvent these
  2274. annoying clicks, I need really help!
  2275. Did anyone out there experience the same phenomenon? Or heard about the
  2276. problem?
  2277. Does anyone know about a nifty trick to bypass it?
  2278. I would greatly appreciate *any* hints and will -of course- post a summary of
  2279. all replys which may get to me directly.
  2280.  
  2281. Thanks a lot,
  2282.  
  2283. Tobias Kunze
  2284. Hochschule der Kuenste Berlin
  2285. Technische Universitaet Berlin
  2286. <tkunze@mvax.kgw.tu-berlin.de>
  2287.  
  2288. P.S.:  English is  n o t  my first language!
  2289.        Please don't laugh at it. Correct me.
  2290.  
  2291. 
  2292. 
  2293. Path: ucivax!gateway
  2294. From: johnsone@uxh.cso.uiuc.edu ("Erik A. Johnson")
  2295. Subject: Re: Resedit example editor code in Think C
  2296. Message-ID: <199107260505.AA12670@uxh.cso.uiuc.edu>
  2297. Newsgroups: fa.think-c
  2298. Lines: 17
  2299. Date: 26 Jul 91 05:06:25 GMT
  2300.  
  2301. Yes, I've got the ResEdit extensions examples running in THINK C,
  2302. thanks to a little help from Phil Shapiro at Symantec.
  2303.  
  2304. I've been trying to clean-up an example editor (that does a little more
  2305. than the example from Apple MacDTS) written with THINK C.  (However,
  2306. time constraints have put it temporarily on hold.)  I'll e-mail the
  2307. entire project or just the ?*.a files to whoever wants them.  (If
  2308. there is enough interest, I could also send it over the think-c
  2309. mail-list and/or post it to sumex.)
  2310.  
  2311.  
  2312. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  2313. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  2314. Graduate Student         \--------------------------------------------\     |
  2315. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  2316. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  2317.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  2318. 
  2319. 
  2320. Path: ucivax!gateway
  2321. From: MCGUFFEY@muvms3.mu.wvnet.edu (Michael McGuffey)
  2322. Subject: Think-C v5.0 in MacWAREHOUSE ad.
  2323. Message-ID: <B45CBEFF60A00550@MARSHALL.WVNET.EDU>
  2324. X-VMS-Cc: MCGUFFEY
  2325. Newsgroups: fa.think-c
  2326. X-VMS-To: IN%"think-c@ics.uci.edu"
  2327. Lines: 19
  2328. Date: 26 Jul 91 16:17:58 GMT
  2329. X-Envelope-to: think-c@ics.uci.edu
  2330.  
  2331.  
  2332. FYI:
  2333.  
  2334. The MacWAREHOUSE ad in the newest MacWorld (Sep 91) shows Think C v5.0
  2335. with a price of $209.  When I called, they said the computer was listing
  2336. v4.0, but it was out of stock.  The girl on the other end said the
  2337. ad lists 5.0 because that's what is expected to be shipped... in about
  2338. 1 1/2 weeks.
  2339.  
  2340. I thought I'd save people some time calling (and MacWAREHOUSE some 1-800
  2341. call costs) and send this to the list.
  2342.  
  2343. --michael
  2344. -----------------------------------------------------------------------------
  2345. Michael McGuffey, Director      BITNET:   mcguffey@marshall
  2346. Office of Institutional Research  Internet: mcguffey@marshall.wvnet.edu
  2347. Marshall University          Phone:    304/696-3212
  2348. Huntington, WV 25755          FAX:      304/696-3601
  2349. -----------------------------------------------------------------------------
  2350. 
  2351. 
  2352. Newsgroups: fa.think-c
  2353. Path: ucivax!orion.oac.uci.edu!eabu111
  2354. From: eabu111@orion.oac.uci.edu (Steven Luh)
  2355. Subject: Re: Think-C v5.0 in MacWAREHOUSE ad.
  2356. Message-ID: <28906FCF.7892@orion.oac.uci.edu>
  2357. Organization: University of California, Irvine
  2358. References: <B45CBEFF60A00550@MARSHALL.WVNET.EDU>
  2359. Date: Fri, 26 Jul 1991 18:54:07 GMT
  2360. Lines: 27
  2361.  
  2362. In article <B45CBEFF60A00550@MARSHALL.WVNET.EDU> MCGUFFEY@muvms3.mu.wvnet.edu (Michael McGuffey) writes:
  2363. >
  2364. >FYI:
  2365. >
  2366. >The MacWAREHOUSE ad in the newest MacWorld (Sep 91) shows Think C v5.0
  2367. >with a price of $209.  When I called, they said the computer was listing
  2368. >v4.0, but it was out of stock.  The girl on the other end said the
  2369. >ad lists 5.0 because that's what is expected to be shipped... in about
  2370. >1 1/2 weeks.
  2371. >
  2372. >I thought I'd save people some time calling (and MacWAREHOUSE some 1-800
  2373. >call costs) and send this to the list.
  2374. >
  2375. >--michael
  2376. >-----------------------------------------------------------------------------
  2377. >Michael McGuffey, Director      BITNET:   mcguffey@marshall
  2378. >Office of Institutional Research  Internet: mcguffey@marshall.wvnet.edu
  2379. >Marshall University          Phone:    304/696-3212
  2380. >Huntington, WV 25755          FAX:      304/696-3601
  2381. >-----------------------------------------------------------------------------
  2382.  
  2383. One question, do you guys know if Think C 5.0 will be a free upgrade via
  2384. anonymous FTP or do we have to send in some moeny??
  2385.  
  2386. Steve
  2387.  
  2388.  
  2389. 
  2390. 
  2391. Path: ucivax!gateway
  2392. From: rudman@mondo.engin.umich.edu
  2393. Subject: Re: Think-C v5.0 in MacWAREHOUSE ad.
  2394. Message-ID: <9107262044.AA25207@mondo.engin.umich.edu>
  2395. Newsgroups: fa.think-c
  2396. Lines: 25
  2397. Date: 26 Jul 91 19:44:33 GMT
  2398.  
  2399. You would think that Symantec would do SOMETHING about the BIGGEST flaws in
  2400. THINK C. Sure, now we can make REALLY small but fast code with the new 5.0
  2401. compiler, but HEY:
  2402.  
  2403. *   We still have the most pitiful debugger on the face of the planet
  2404. (although, we DO have one). Why can't we have something with the
  2405. functionality of THINK Pascal's debugger?
  2406.  
  2407. *   We STILL can't specify what we'd like our default font and size to be.
  2408. Well, heck, it's not a BIG deal, but it IS a pain!!
  2409.  
  2410. *   We still have a pretty sad interface. There's a lot of things out
  2411. there, and we've still got the bare bones. Now, I might add that I kinda
  2412. LIKE bare bones stuff.. but I'd like the OPTION at least of a real
  2413. interface.
  2414.  
  2415.  
  2416. Anyways, enuff grumblin'....
  2417.  
  2418.  
  2419. //Dan
  2420. The University of Michigan
  2421. Computer-Aided Engineering Network
  2422. Macintosh Systems Administration
  2423.  
  2424. 
  2425. 
  2426. Path: ucivax!gateway
  2427. From: fleabag@athena.mit.edu
  2428. Subject: Re: Think-C v5.0
  2429. Message-ID: <9107262121.AA23224@M4-035-2.MIT.EDU>
  2430. Newsgroups: fa.think-c
  2431. Lines: 34
  2432. Date: 26 Jul 91 21:22:00 GMT
  2433.  
  2434.  
  2435. first, is there really such a thing?
  2436.  
  2437. second, is it really shipping in "1-1/2 weeks"?
  2438.  
  2439. third, why didn't we hear about it before macWH?
  2440.  
  2441. also:
  2442.  
  2443. > *   We still have the most pitiful debugger on the face of the planet
  2444. > (although, we DO have one). Why can't we have something with the
  2445. > functionality of THINK Pascal's debugger?
  2446.  
  2447. perhaps you've never used sade!  (they don't call it that for
  2448. nothin' ;-)  i give think C about 1000% higher marks than sade.
  2449. though i look forward to seeing what think pascal looks like...
  2450.  
  2451. > *   We still have a pretty sad interface. There's a lot of things out
  2452. > there, and we've still got the bare bones. Now, I might add that I kinda
  2453. > LIKE bare bones stuff.. but I'd like the OPTION at least of a real
  2454. > interface.
  2455.  
  2456. sorry, i like the interface.  get yerself 4+ or some other super-
  2457. enhancer, and suddenly there's nothing you can't do quickly.
  2458.  
  2459. more apologies for the tone here, but i just love think c.  keep
  2460. mpw away from me.
  2461.  
  2462. (hey, could someone get paid for saying stuff like this if they
  2463. wanted to? ;)
  2464.  
  2465. :jeff bellsey
  2466.  
  2467. fleabag@athena.mit.edu
  2468. 
  2469. 
  2470. Newsgroups: fa.think-c
  2471. Path: ucivax!orion.oac.uci.edu!eabu111
  2472. From: eabu111@orion.oac.uci.edu (Steven Luh)
  2473. Subject: Gestalt Manager header
  2474. Message-ID: <2890956C.22443@orion.oac.uci.edu>
  2475. Organization: University of California, Irvine
  2476. Date: Fri, 26 Jul 1991 21:34:35 GMT
  2477. Lines: 14
  2478.  
  2479. I was just looking at the new Gestalt manager and was wondering where I can get
  2480. the header file for Think C so I can access it.  I got the Gestalt file that
  2481. was on ICS.UCI.EDU but it seems to be a little out dated or something.  Also,
  2482. I got a source code from my friend that says it uses the Gestalt Manager (He
  2483. said it was the exact sample code that was given on Think Reference) but I get
  2484. a Link error because it doesn't recognize the command Gestalt, whats going on?
  2485.  
  2486. It compiles fine but doesn't seem to recognize it.
  2487.  
  2488. BTW, I'm new at mac programming so please elaborate as much as possible (any
  2489. hints/tips to the Think C manuals would help too!).
  2490.  
  2491. Steven
  2492.  
  2493. 
  2494. 
  2495. Path: ucivax!gateway
  2496. From: evensen@husc.harvard.edu
  2497. Subject: Think-C v5.0 in MacWAREHOUSE ad.
  2498. Message-ID: <9107262332.AA08830@husc10>
  2499. In-Reply-To: rudman@mondo.engin.umich.edu's message of 26 Jul 91 19:44:33 GMT <9107262044.AA25207@mondo.engin.umich.edu>
  2500. Newsgroups: fa.think-c
  2501. Lines: 6
  2502. Date: 26 Jul 91 23:33:18 GMT
  2503.  
  2504. I posted something about this to c.s.m.p.  What I was really looking
  2505. forward to was a full C++ implementation.  Anyone else looking for
  2506. C++?
  2507.  
  2508. --Erik
  2509.  
  2510. 
  2511. 
  2512. Path: ucivax!gateway
  2513. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2514. Subject: Think-C v5.0 in MacWAREHOUSE ad.
  2515. Message-ID: <9107270129.AA00792@chaos.cs.brandeis.edu>
  2516. In-Reply-To: rudman@mondo.engin.umich.edu's message of 26 Jul 91 19:44:33 GMT <9107262044.AA25207@mondo.engin.umich.edu>
  2517. Newsgroups: fa.think-c
  2518. Lines: 19
  2519. Date: 27 Jul 91 01:29:11 GMT
  2520.  
  2521.    * We STILL can't specify what we'd like our default font and size
  2522.    to be.  Well, heck, it's not a BIG deal, but it IS a pain!!
  2523.  
  2524. You can change the default font, size and number of tabs displayed in
  2525. a source code window by modifying the 'CNFG' 0 resource in THINK C.
  2526. This is described someplace in the Editor chapter (don't have my
  2527. manuals on hand) -- probably on the same page that describes the Set
  2528. Font and Tabs dialog box.
  2529.  
  2530. Re: the MacWarehouse ad: The official line on this is that it was a
  2531. media scheduling error.  As with any of our products, a new release
  2532. will occur when and if a product is fully tested and is ready to be
  2533. released, no sooner.
  2534.  
  2535.     -phil
  2536. ----
  2537.    Phil Shapiro                           Technical Support Analyst
  2538.    Language Products Group                     Symantec Corporation
  2539.         Internet: phils@chaos.cs.brandeis.edu
  2540. 
  2541. 
  2542. Path: ucivax!gateway
  2543. From: mkelly@apple.com
  2544. Subject: Re: QuickDraw32 bit
  2545. Message-ID: <9107270219.AA20136@apple.com>
  2546. In-Reply-To: Your message of 25 Jul 91 18:28:55 GMT.
  2547.              <9107251828.AA08397@jolt.eng.umd.edu>
  2548. Newsgroups: fa.think-c
  2549. Lines: 18
  2550. Date: 27 Jul 91 02:20:08 GMT
  2551.  
  2552.  
  2553.  
  2554. >GetGWorldPixMap?  It's not in my header files either.  What is it supposed
  2555. >to do?  I've got a GetPixBaseAddr:
  2556. >pascal Ptr GetPixBaseAddr (PixMapHandle pm)
  2557. >    = {0x700F,0xAB1D};
  2558.  
  2559. Look in IM VI for the details.  This is from the 'QDOffscreen.h' MPW C
  2560. header.  It may or may not work with Think C, haven't tested it.
  2561.  
  2562. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  2563.     = {0x203C,0x0004,0x0017,0xAB1D};
  2564.  
  2565. Mike.
  2566. _____________________________________________________________________________
  2567. Michael A. Kelly                                   America Online: Michael792
  2568. mkelly@cs.uoregon.edu or mkelly@apple.com              Compu$erve: 73567,1651
  2569. _____________________________________________________________________________
  2570. 
  2571. 
  2572. Path: ucivax!gateway
  2573. From: rudman@mondo.engin.umich.edu (Daniel Edward Rudman)
  2574. Subject: Re: Think-C v5.0 in MacWAREHOUSE ad.
  2575. Message-ID: <9107270737.AA26528@mondo.engin.umich.edu>
  2576. Newsgroups: fa.think-c
  2577. Lines: 6
  2578. Date: 27 Jul 91 06:37:58 GMT
  2579.  
  2580. Hey, thanks for the tip, Phil. I must have missed that blurb on the default
  2581. stuff (scratches head, now WHERE the heck is that stuff?).
  2582.  
  2583. Oops on the media goof.  Hey, the 5.0 compiler *IS* nice.
  2584.  
  2585. //Dan
  2586. 
  2587. 
  2588. Path: ucivax!gateway
  2589. From: rudman@mondo.engin.umich.edu (Daniel Edward Rudman)
  2590. Subject: Re: Think-C v5.0
  2591. Message-ID: <9107270738.AA26533@mondo.engin.umich.edu>
  2592. Newsgroups: fa.think-c
  2593. Lines: 5
  2594. Date: 27 Jul 91 06:39:20 GMT
  2595.  
  2596. I like THINK C a lot, Jeff, don't get me wrong. I was just making the point
  2597. that it could use a LOT of improvement interface-wise. I *HATE* MPW and
  2598. I hate MacApp and I can't STAND Pascal, so THINK C is a great choice!
  2599.  
  2600. //Dan
  2601. 
  2602. 
  2603. Path: ucivax!gateway
  2604. From: evensen@husc.harvard.edu
  2605. Subject: debugger window position (was Think-C v5.0 in MacWAREHOUSE ad.)
  2606. Message-ID: <9107271106.AA12444@husc10>
  2607. In-Reply-To: Phil Shapiro's message of 27 Jul 91 01:29:11 GMT <9107270129.AA00792@chaos.cs.brandeis.edu>
  2608. Newsgroups: fa.think-c
  2609. Lines: 27
  2610. Date: 27 Jul 91 11:06:48 GMT
  2611.  
  2612. The appended note brings up a question I've had.  On my ordinary Mac
  2613. IIx the debugger windows obscure part of the console i/o window.  I
  2614. can resize and move them but this is a pain during the development
  2615. cycle.  Is it possible to muck with the resources in Think C to change
  2616. the default locations of the debugger windows?
  2617.  
  2618. --Erik (evensen@husc.harvard.edu)
  2619.  
  2620.    From: Phil Shapiro <phils@chaos.cs.brandeis.edu>
  2621.  
  2622.       * We STILL can't specify what we'd like our default font and size
  2623.       to be.  Well, heck, it's not a BIG deal, but it IS a pain!!
  2624.  
  2625.    You can change the default font, size and number of tabs displayed in
  2626.    a source code window by modifying the 'CNFG' 0 resource in THINK C.
  2627.    This is described someplace in the Editor chapter (don't have my
  2628.    manuals on hand) -- probably on the same page that describes the Set
  2629.    Font and Tabs dialog box.
  2630.  
  2631.    [stuff about 5.0 deleted]
  2632.  
  2633.        -phil
  2634.    ----
  2635.       Phil Shapiro                           Technical Support Analyst
  2636.       Language Products Group                     Symantec Corporation
  2637.            Internet: phils@chaos.cs.brandeis.edu
  2638.  
  2639. 
  2640. 
  2641. Path: ucivax!gateway
  2642. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2643. Subject: debugger window position (was Think-C v5.0 in MacWAREHOUSE ad.)
  2644. Message-ID: <9107271622.AA10602@chaos.cs.brandeis.edu>
  2645. In-Reply-To: evensen@husc.harvard.edu's message of 27 Jul 91 11:06:48 GMT <9107271106.AA12444@husc10>
  2646. Newsgroups: fa.think-c
  2647. Lines: 16
  2648. Date: 27 Jul 91 16:22:30 GMT
  2649.  
  2650. Erik writes:
  2651.    The appended note brings up a question I've had.  On my ordinary Mac
  2652.    IIx the debugger windows obscure part of the console i/o window.  I
  2653.    can resize and move them but this is a pain during the development
  2654.    cycle.  Is it possible to muck with the resources in Think C to change
  2655.    the default locations of the debugger windows?
  2656.  
  2657. No, it's not possible.  The Debugger dynamically places its windows,
  2658. so there's no resource to change.
  2659.  
  2660. As an alternative, you may want to try using the console_options to
  2661. place the console window so the Debugger's window's won't interfere
  2662. with it.  Also, you could write a QuicKeys macro to move the windows
  2663. around when the debugger comes up.
  2664.  
  2665.     -phil
  2666. 
  2667. 
  2668. Path: ucivax!gateway
  2669. From: ephraim@think.com (Ephraim Vishniac)
  2670. Subject: Re: Think-C v5.0 in MacWAREHOUSE ad.
  2671. Message-ID: <9107272246.AA14707@leander.think.com>
  2672. In-Reply-To: Your message of "27 Jul 91 01:29:11 GMT."
  2673.              <9107270129.AA00792@chaos.cs.brandeis.edu>
  2674. Newsgroups: fa.think-c
  2675. Lines: 16
  2676. Date: 27 Jul 91 22:46:30 GMT
  2677.  
  2678.  
  2679.    From: Phil Shapiro <phils@chaos.cs.brandeis.edu>
  2680.    Date: 27 Jul 91 01:29:11 GMT
  2681.  
  2682.    Re: the MacWarehouse ad: The official line on this is that it was a
  2683.    media scheduling error.  As with any of our products, a new release
  2684.    will occur when and if a product is fully tested and is ready to be
  2685.    released, no sooner.
  2686.  
  2687. But if you had your druthers, I'll bet you'd rather that day was, oh,
  2688. August 6th.
  2689.  
  2690. Ephraim Vishniac    ephraim@think.com   ThinkingCorp@applelink.apple.com
  2691.  Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142
  2692.         One of the flaws in the anarchic bopper society was
  2693.         the ease with which such crazed rumors could spread.
  2694. 
  2695. 
  2696. Path: ucivax!gateway
  2697. From: evensen@husc.harvard.edu
  2698. Subject: [ECO861771@ecostat.aau.dk: Re: Think-C v5.0 in MacWAREHOUSE ad.]
  2699. Message-ID: <9107280108.AA14329@husc10>
  2700. Newsgroups: fa.think-c
  2701. Lines: 30
  2702. Date: 28 Jul 91 01:09:14 GMT
  2703.  
  2704. Here's a message that Povl sent to me instead of the think-c list.
  2705. I'm forwarding it to the list and to him at his request...
  2706.  
  2707. --Erik
  2708.  
  2709. Return-Receipt-To: ECO861771@ecostat.aau.dk
  2710. Date: Sun, 28 Jul 91 01:13 +0200
  2711. From: "Povl H. Pedersen" <ECO861771@ecostat.aau.dk>
  2712. Subject: Re: Think-C v5.0 in MacWAREHOUSE ad.
  2713. To: evensen@husc
  2714. X-Envelope-To: evensen@husc.harvard.edu
  2715. X-Vms-To: UNIL63::IN%"evensen@husc.harvard.edu"
  2716.  
  2717.  
  2718. I would also like the 5.0 to be a full C++, but from the romours there
  2719. has been over time, then the next major release (guess that is 5.0) will
  2720. be a full ANSI compiler, and not full C++.
  2721.  
  2722. This is the reason why I have ordered the MPW C bundle and C++ from APDA.
  2723. I need C++ to a larger programming project that I am part of, that will
  2724. be created for DOS machines, and then quickly after that ported to mac.
  2725. I program the general parts, and thge Mac I/F, and am thus making sure
  2726. that our code is very portable from the start. But I needed the C++.
  2727. So I will stick to slow MPW C/C++ until Symantec comes with a full C++.
  2728.  
  2729. SYMANTEC, THERE IS A MARKET OUT HERE! GIVE US WHAT WE DEMAND "!!!
  2730.  
  2731. Povl H. Pedersen,
  2732. eco861771@ecostat.aau.dk   /   hp48sx@wuarchive.wustl.edu
  2733.  
  2734. 
  2735. 
  2736. Path: ucivax!gateway
  2737. From: nagel@ics.uci.edu (Mark Nagel)
  2738. Subject: ARCHIVE: WindElephant
  2739. Message-ID: <3093.680721522@ics.uci.edu>
  2740. Newsgroups: fa.think-c
  2741. Reply-To: nagel@ics.uci.edu
  2742. Lines: 20
  2743. Date: 28 Jul 91 17:18:49 GMT
  2744. X-Phone: (714) 753-0414 x115
  2745.  
  2746.  
  2747. From: Adam Schabtach <schabtac@stout.atd.ucar.EDU>
  2748. Subject: submission for archives
  2749. Date: Sun, 28 Jul 91 10:53:19 MDT
  2750.  
  2751. Hello--
  2752.  
  2753. The attached .sit/.hqx file contains an init (and accompanying
  2754. documentation) that fixes an often-complained-about problem with the
  2755. THINK C debugger. It remembers the positions and sizes of the main
  2756. windows in the debugger. Move the windows to where you want them once,
  2757. and they stay there until moved again.
  2758.  
  2759. I haven't used it much, but it seems to work. I didn't write it; I claim
  2760. no credit or responsibility for it. Just passing it on.
  2761.  
  2762. --Adam
  2763. schabtac@stout.atd.ucar.edu
  2764.  
  2765. [saved as: /mac/think-c/compiler/windelephant.hqx; 11K]
  2766. 
  2767. 
  2768. Path: ucivax!gateway
  2769. From: russ@magnum.convex.com (Russell Donnan)
  2770. Subject: Re:  Think-C v5.0 in MacWAREHOUSE ad.
  2771. Message-ID: <9107262002.AA05427@magnum.convex.com>
  2772. Newsgroups: fa.think-c
  2773. Lines: 18
  2774. Date: 29 Jul 91 12:31:41 GMT
  2775.  
  2776. >The MacWAREHOUSE ad in the newest MacWorld (Sep 91) shows Think C v5.0
  2777. >with a price of $209.  When I called, they said the computer was listing
  2778. >v4.0, but it was out of stock.  The girl on the other end said the
  2779. >ad lists 5.0 because that's what is expected to be shipped... in about
  2780. >1 1/2 weeks.
  2781.  
  2782. I find it awfully hard to believe that it is shipping in 1 1/2 weeks if
  2783. we, the loyal following, haven't received our upgrade notices.  On the other
  2784. hand, I never received an upgrade notice for ThinkC 4.0 or Think Pascal 3.0
  2785. either.  Has anyone received an upgrade anouncement for ThinkC 5.0?
  2786. It's not like I haven't faithfully upgraded every Revision since I bough
  2787. LightSpeed C v1.1 way back when...
  2788.  
  2789. -Russ
  2790. ---
  2791. Russ Donnan, (214) 497-4778, russ@convex.com
  2792. Convex Computer Corporation, 3000 Waterview Parkway, Richardson, TX, USA
  2793. Vs lbh pna ernq guvf, guvax nobhg vg.  Lbh'er n areq zna...
  2794. 
  2795. 
  2796. Path: ucivax!gateway
  2797. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  2798. Subject: Help Me Understand Colour
  2799. Message-ID: <9108.9107291535@lfcs.ed.ac.uk>
  2800. Newsgroups: fa.think-c
  2801. Lines: 72
  2802. Date: 29 Jul 91 15:39:26 GMT
  2803.  
  2804. It's like this. I'm a Mac user and programmer. I have a couple of volumes
  2805. of Inside Mac and the technotes stack, System 7.0, ResEdit 2.0.1, THINK C,
  2806. MIDI Manager, two hard disks, two monitors, and have written tens of
  2807. thousands of lines of code on my machine, but one thing now confuses me:
  2808.  
  2809. Colour.
  2810.  
  2811. I've read the Inside Mac V chapters on the Color and Pallette Managers and
  2812. scoured the tech notes, but somehow I don't feel I have the whole story.
  2813. Could somebody fill me in? Just to make it less work if you do wish to
  2814. follow up, I'll draw boxes for you to tick.
  2815.  
  2816. I have a Radius FPD with 2 bits' worth of greyscale (OK, not much in the
  2817. way of colour, but I prefer greyscale and I intend to add more bits). I'm
  2818. finding that programs and control panel windows tend to alter the "colours"
  2819. fairly indiscriminantly and leave them altered. When I first used the
  2820. monitor it was highlighting Finder icons in grey, and very nice it was too.
  2821. Now it highlights them in very dark (5% perhaps?) grey and I can't change
  2822. it back. Most of them time disabled menu items are a proper shade of grey,
  2823. but after opening a control panel or two the menus become stippled instead.
  2824. My guess is that the pallette manager is trying to deal with serious colour
  2825. contention, and things like the stippled menus and variable desktop
  2826. colouring are due to applications (and the Finder) being quite lax about
  2827. their colour requirements, so there is some hysteresis in the pallette
  2828. management. Am I right?
  2829.  
  2830.         Yes: [ ]   No: [ ]   It's not that simple: [ ] _____________
  2831.  
  2832. A more fundamental question: who decides what colours I have available
  2833. anyway? The pallette management is a relative thing, depending on the
  2834. lookup table in place, but where does that come from when I turn my machine
  2835. on?
  2836.  
  2837.         System File: [ ]   Video Card: [ ]   It's not that simple: [ ]
  2838. ______
  2839.  
  2840. (I noticed a couple of clut resources in the system file, but nothing for
  2841. 2-bit grey.)
  2842.  
  2843. Under System 7.0, the Finder is always running, so (presumably) it always
  2844. has a pallette in context. So, what about things like the desktop pattern?
  2845. I can open eight colour wheels from the General control panel, but I don't
  2846. see how this makes any sense since I only have two free levels of grey.
  2847. Opening a colour wheel has a nondeterministic, and temporary, effect. I
  2848. always get back to two fixed greys (5% or so and another which is the
  2849. highlighting shade: 60% or so). Should the desktop pattern/colour dialog
  2850. make sense to me? Even if I have a lot of "real" colours, whose pallette is
  2851. the desktop using? Is it really too complicated for me to understand?
  2852.  
  2853.         No: [ ] ____________   Yes: [ ]
  2854.  
  2855. Finally: can someone give me a brief explanation of icl4 and icl8
  2856. resources?
  2857.  
  2858.         Yes: [ ] ____________   No: [ ]
  2859.  
  2860. I'm assuming that they are purely for the Finder desktop icons (and form
  2861. part of BNDL resources). In this case, they must conform to the Finder's
  2862. pallette. Is this fixed? (i.e. are Finder icons drawn from a fixed set of
  2863. colours?) I assumed that icl4 resources were 4-bit (16-colour) and icl8
  2864. were 8-bit, but it doesn't seem to be that simple. ResEdit provides two
  2865. colour pallettes which overlap in some strange way, and I don't understand
  2866. the significance of this.
  2867.  
  2868. Sorry for all the questions, but Inside Mac V and the TN's don't seem to
  2869. provide any answers. I'm willing to be pointed at documentation. (Bear in
  2870. mind that I'm in Scotland so finding it might be difficult...)
  2871.  
  2872. Anybody who helps gets, as a free gift, a copy of my first icl4.
  2873.  
  2874.         Nick.
  2875.  
  2876. 
  2877. 
  2878. Path: ucivax!gateway
  2879. From: k044477@hobbes.kzoo.edu (Jamie McCarthy)
  2880. Subject: Re: Colo[u]r
  2881. Message-ID: <9107291828.AA10697@hobbes.kzoo.edu>
  2882. X-Mailer: ELM [version 2.3 PL11]
  2883. Newsgroups: fa.think-c
  2884. Lines: 96
  2885. Date: 29 Jul 91 18:27:57 GMT
  2886.  
  2887. Nick Rothwell writes:
  2888.  
  2889. > It's like this. I'm a Mac user and programmer. I have a couple of volumes
  2890. > of Inside Mac and the technotes stack, System 7.0, ResEdit 2.0.1, THINK C,
  2891. > MIDI Manager, two hard disks, two monitors, and have written tens of
  2892. > thousands of lines of code on my machine, but one thing now confuses me:
  2893. >
  2894. > Colour.
  2895.  
  2896. If I explain it to you, will you give me one of your monitors?
  2897.  
  2898. > I've read the Inside Mac V chapters on the Color and Pallette Managers
  2899.  
  2900. Speaking as someone who's written a game using the Color instead of the
  2901. Palette Manager:  skip the Color Manager chapter.  Read it for
  2902. background if you really want to, but don't use any of the routines in
  2903. there.  If I could do it over again, I'd use the Palette Manager; you
  2904. should too.
  2905.  
  2906. If you have a very pressing need, the C.M. can of course be useful--but
  2907. by the time you know if you have a pressing need, you'll understand
  2908. everything so well you'll ignore any advice I give you anyway.  :-)
  2909.  
  2910. > Most of them time disabled menu items are a proper shade of grey,
  2911. > but after opening a control panel or two the menus become stippled instead.
  2912. > My guess is that the pallette manager is trying to deal with serious colour
  2913. > contention, and things like the stippled menus and variable desktop
  2914. > colouring are due to applications (and the Finder) being quite lax about
  2915. > their colour requirements
  2916.  
  2917. In 2-bit color, you have black, white, 50% gray, and your chosen hilite
  2918. color (with the "Color" control panel).  I suspect it's the same in
  2919. 2-bit gray.
  2920.  
  2921. If some application demands too many colors--"too many" being in your
  2922. case two--the menus can no longer be done in gray, and will be stippled.
  2923. ("Stippled" is a good word to distinguish the two new kinds of
  2924. "graying-out"--I like it.)  So yes, "serious" color contention, but
  2925. it doesn't take much to make 2-bit gray monitors get serious.  If you
  2926. can play with a 256-color system, it may help a lot.
  2927.  
  2928. Most applications should make "pmTolerant" or "pmCourteous" demands for
  2929. color, and if the color they demand is acceptable to the Finder, it will
  2930. pmTolerantly demand the same color, and the Finder and Other App will
  2931. happily share.  Some applications (paint programs, games) will make
  2932. "pmExplicit" or "pmAnimated" demands, and the Finder won't be able to
  2933. use those colors.
  2934.  
  2935. > A more fundamental question: who decides what colours I have available
  2936. > anyway? The pallette management is a relative thing, depending on the
  2937. > lookup table in place, but where does that come from when I turn my machine
  2938. > on?
  2939.  
  2940. The "default" palettes are stored as 'pltt' resources equal to screen
  2941. depth, plus 128 (I think) for greyscale.  So 2-bit gray is (someone
  2942. double-check me here) the ROM 'pltt' resource ID 130.
  2943.  
  2944. > Finally: can someone give me a brief explanation of icl4 and icl8
  2945. > resources?
  2946. >
  2947. >         Yes: [ ] ____________   No: [ ]
  2948. >
  2949. > I'm assuming that they are purely for the Finder desktop icons (and form
  2950. > part of BNDL resources). In this case, they must conform to the Finder's
  2951. > pallette. Is this fixed? (i.e. are Finder icons drawn from a fixed set of
  2952. > colours?) I assumed that icl4 resources were 4-bit (16-colour) and icl8
  2953. > were 8-bit, but it doesn't seem to be that simple. ResEdit provides two
  2954. > colour pallettes which overlap in some strange way, and I don't understand
  2955. > the significance of this.
  2956.  
  2957. They _should_ conform to the Finder's palettes.  There're something like
  2958. 31 "recommended" Finder colors out of the possible 256 colors that an
  2959. 'icl8' can use.  ResEdit will show you both of these palettes.  If
  2960. you're designing an icl for your own use, use whatever colors you like,
  2961. but if it's for the Finder, you should stick to the 31 base colors.
  2962. Same for icl4, but fewer colors, naturally.
  2963.  
  2964. I don't know for sure, but I suspect the Finder demands these "base"
  2965. colors pmTolerant-ly, and the others pmCourteous-ly.
  2966.  
  2967. > Anybody who helps gets, as a free gift, a copy of my first icl4.
  2968. >
  2969. >         Nick.
  2970.  
  2971. I'd be overjoyed.
  2972.  
  2973. The main thing about color is to understand the structure of a 'pltt'
  2974. resource and a PaletteHandle;  to understand the different types of
  2975. color usage (all six);  to understand attaching palettes to windows, and
  2976. when palettes get changed, and how updates get sent when they do;  and
  2977. to understand how GDevices fit in to everything.  There's more but
  2978. that's the main stuff.  I'm a long ways from being an expert, but I'm
  2979. trying...
  2980. --
  2981.  Jamie McCarthy                    k044477@kzoo.edu
  2982.  Disclaimer:  it's my responsibility iff they're my words.
  2983. 
  2984. 
  2985. Path: ucivax!gateway
  2986. From: narf@u.washington.edu (Francis Taylor)
  2987. Subject: Berkeley Sockets for Think C
  2988. Message-ID: <9107291934.AA24866@milton.u.washington.edu>
  2989. Newsgroups: fa.think-c
  2990. Reply-To: narf@hitl.vrnet.washington.edu
  2991. Lines: 4
  2992. Date: 29 Jul 91 19:34:52 GMT
  2993.  
  2994. Does anyone have an implementation of Berkeley Sockets for MacTCP and
  2995. Think C?  There was something mentioned in comp.sys.mac.programmer a
  2996. while back, but the machine and the author have both disappeared.
  2997. Thanks.
  2998. 
  2999. 
  3000. Path: ucivax!gateway
  3001. From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
  3002. Subject: Re: Colo[u]r
  3003. Message-ID: <18239.9107301329@lfcs.ed.ac.uk>
  3004. Newsgroups: fa.think-c
  3005. Lines: 92
  3006. Date: 30 Jul 91 13:49:54 GMT
  3007.  
  3008. >If I explain it to you, will you give me one of your monitors?
  3009.  
  3010. heh, well, I'd like to hang onto the Radius FPD (at least until I've paid
  3011. for it) and the other is the SE/30 internal which won't really detach
  3012. without surgery. Anyways, thanks for your comments, and also to Phil
  3013. Shapiro (some of whose comments I might refer to) and Chris Johnson.
  3014.  
  3015. >Speaking as someone who's written a game using the Color instead of the
  3016. >Palette Manager:  skip the Color Manager chapter.
  3017.  
  3018. Fair enough. I can see that the Pallette Manager provides everything I
  3019. should need in an application, but I was curious where the initial colours
  3020. came from in the first place. Phil tells me it's the video card, although
  3021. there are clut resources in the System file as well, so I'm not totally
  3022. clear what part they both play. I also notice (explicit) colour tables
  3023. mentioned in the Control Manager chapter of IM-V as well, which is a bit
  3024. confusing. Controls should be drawn in a window with a pallette; I don't
  3025. see why *anything* should be pottering around with RBG values (except those
  3026. specified in pallettes). I also notice that... (flip flip flip...) "Each
  3027. colour window... should have its own colour table" (V-204) - I presume that
  3028. this is a set of specific colours for the WDEF, giving title bar colours
  3029. and the like. I don't see why this isn't a pallette instead.
  3030.  
  3031. >In 2-bit color, you have black, white, 50% gray, and your chosen hilite
  3032. >color (with the "Color" control panel).  I suspect it's the same in
  3033. >2-bit gray.
  3034.  
  3035. Actually, I seem to have black, white, *5% grey* and my highlight colour.
  3036. The 5% grey is what the Finder uses to highlight icons (as opposed to the
  3037. highlight colour for text) which isn't too pretty. Now, I suspect my
  3038. troubles are caused by the General control panel and the colour wheels used
  3039. for setting the desktop pattern. Phil reckons it doesn't make any sense to
  3040. have eight colour wheels for a 2-bit system, and I tend to agree. It's
  3041. these things which seem to make permanent (and confusing) changes.
  3042.  
  3043. >If some application demands too many colors--"too many" being in your
  3044. >case two--the menus can no longer be done in gray, and will be stippled.
  3045. >("Stippled" is a good word to distinguish the two new kinds of
  3046. >"graying-out"--I like it.)
  3047.  
  3048. ...and there's another (small) piece to the puzzle here - various system
  3049. components (menus, and controls such as buttons) seem able to sense when
  3050. there is a 50% grey they can use for disabled items, and will stipple if
  3051. they can't find it. I expect there is a simple way to do this, but I didn't
  3052. notice it on a first pass through the documentation. It would be a useful
  3053. trick to know - I do stippling in my application even when I have that grey
  3054. available.
  3055.  
  3056. >Most applications should make "pmTolerant" or "pmCourteous" demands for
  3057. >color, and if the color they demand is acceptable to the Finder, it will
  3058. >pmTolerantly demand the same color, and the Finder and Other App will
  3059. >happily share.
  3060.  
  3061. OK, now hang on a second... (flip flip flip...) pmTolerant I understand
  3062. (and precise matches have tolerance 0) but I don't understand the
  3063. definition of pmCourteous on page V-154. What is a courteous colour?
  3064.  
  3065. >The "default" palettes are stored as 'pltt' resources equal to screen
  3066. >depth, plus 128 (I think) for greyscale.  So 2-bit gray is (someone
  3067. >double-check me here) the ROM 'pltt' resource ID 130.
  3068.  
  3069. OK, I'll have to double-check. I think my System file contains two
  3070. pallettes, one for 4-bit and one for 8-bit colour, and nothing else. Phil
  3071. tells me that the "default pallette" is loaded from the video card and is
  3072. the one used by the Finder (so the Finder's window appearance is dependent
  3073. on the video card's colour table. Hmm...)
  3074.  
  3075. >but if it's for the Finder, you should stick to the 31 base colors.
  3076. >Same for icl4, but fewer colors, naturally.
  3077.  
  3078. Fine. I was a little confused by ResEdit's interface to the icl4/icl8
  3079. editor, but I noticed that the pallette was constant so ResEdit is
  3080. presumably using the "default" System pallette in order to show me what the
  3081. Finder will display.
  3082.  
  3083. Anyway. There seems to be more information in the Window Manager chapter of
  3084. IM-V, so I'm going to dig into that next. My immediate problem is to get
  3085. back the grey icon highlighting in the Finder (highlighting in something
  3086. close to black is no fun). I can't do much more until I add some more pixel
  3087. depth; I'm assuming that the Finder 7.0 interface engages its warp drive
  3088. once I have 4-bit greyscale or above.
  3089.  
  3090. Thanks again for the information. If/when things become clear to me, I'll
  3091. post another message. I'm still surprised that it's all so complicated,
  3092. though. I almost wish it was just a case of painting everything bright blue
  3093. and purple like IBM PC's do. Well, on second thoughts...
  3094.  
  3095.         Nick.
  3096.  
  3097. P.S. Regarding the European/American spellings: it seems to be quite
  3098. simple. I just let the *Color* Manager manage my *Colours*.
  3099.  
  3100. 
  3101. 
  3102. Path: ucivax!orion.oac.uci.edu!nntpsrv
  3103. From: bdugan@teri.bio.uci.edu (Bill Dugan)
  3104. Subject: QK cache needed with QuicKeys 2.1?
  3105. Nntp-Posting-Host: teri.bio.uci.edu
  3106. Message-ID: <289575D5.28559@orion.oac.uci.edu>
  3107. Newsgroups: fa.think-c
  3108. Organization: University of California, Irvine
  3109. Lines: 7
  3110. Date: 30 Jul 91 14:21:09 GMT
  3111. Distribution: na
  3112.  
  3113. The title sums it up.  With Quickeys 2.1 and System 7.0, am I still
  3114. supposed to use the QK cache init?
  3115.  
  3116. bill
  3117. --
  3118. bill
  3119. bdugan@teri.bio.uci.edu
  3120. 
  3121. 
  3122. Path: ucivax!gateway
  3123. From: liberte@ncsa.uiuc.edu (Daniel LaLiberte)
  3124. Subject: Re: Colo[u]r
  3125. Message-ID: <9107301513.AA14054@yoyodyne.ncsa.uiuc.edu>
  3126. Newsgroups: fa.think-c
  3127. Lines: 8
  3128. Date: 30 Jul 91 15:15:24 GMT
  3129.  
  3130. I wrote a clut editor, that happens to be called NCSA PalEdit, which
  3131. does direct clut manipulation.  You may find it interesting to look over
  3132. the source which is available via anonymous ftp from ftp.ncsa.uiuc.edu.
  3133. This was written with Think C by the way.
  3134.  
  3135. Dan LaLiberte
  3136. National Center for Supercomputing Applications
  3137. liberte@ncsa.uiuc.edu
  3138. 
  3139. 
  3140. Path: ucivax!gateway
  3141. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  3142. Subject: QK cache needed with QuicKeys 2.1?
  3143. Message-ID: <9107301709.AA12587@chaos.cs.brandeis.edu>
  3144. In-Reply-To: Bill Dugan's message of 30 Jul 91 14:21:09 GMT <289575D5.28559@orion.oac.uci.edu>
  3145. Newsgroups: fa.think-c
  3146. Lines: 12
  3147. Date: 30 Jul 91 17:09:49 GMT
  3148.  
  3149. From: Bill Dugan <bdugan@teri.bio.UCI.EDU>
  3150.    The title sums it up.  With Quickeys 2.1 and System 7.0, am I still
  3151.    supposed to use the QK cache init?
  3152.  
  3153. No, the QK cache is no longer necessary (starting with QK 2.0, I
  3154. think).
  3155.  
  3156.     -phil
  3157. ----
  3158.    Phil Shapiro                           Technical Support Analyst
  3159.    Language Products Group                     Symantec Corporation
  3160.         Internet: phils@chaos.cs.brandeis.edu
  3161. 
  3162. 
  3163. Path: ucivax!gateway
  3164. From: schabtac@stout.atd.ucar.edu (Adam Schabtach)
  3165. Subject: Default Palette
  3166. Message-ID: <9107310334.AA01673@stout.atd.ucar.EDU>
  3167. Newsgroups: fa.think-c
  3168. Lines: 20
  3169. Date: 31 Jul 91 03:35:08 GMT
  3170.  
  3171. All this talk about colors has reminded me of a question I've had for
  3172. a long time: how were the colors for the default 8-bit palette chosen?
  3173. Was there any logic to it? If you look at the default palette, there
  3174. seems to be little sense to the way it's organized, a fair amount of
  3175. redundancy, and a number of missing colors (a good orange, for
  3176. instance).
  3177.  
  3178. Anybody happen to know why it's set up this way?
  3179.  
  3180. I have discovered something that might explain it, but I sort of hope
  3181. I'm wrong. Remember the old GIF of the mirrored balls suspended in
  3182. space above an infinite plane of Apple logos? I think Apple used to
  3183. use it to show off the Mac II, and SuperMac used it in advertisements
  3184. for their monitors. The CLUT for that GIF seems to be the same as the
  3185. default palette. Now, Apple wouldn't just arbitrarily use that CLUT as
  3186. the default palette for no other good reason, would they? Tell me it
  3187. ain't so...
  3188.  
  3189. --Adam
  3190.  
  3191. 
  3192. 
  3193. Path: ucivax!gateway
  3194. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  3195. Subject: Re:  Default Palette
  3196. Message-ID: <9107311355.AA13172@bree.eng.umd.edu>
  3197. Newsgroups: fa.think-c
  3198. Lines: 8
  3199. Date: 31 Jul 91 13:56:00 GMT
  3200.  
  3201. Take a look at the default CLUT.  There is a definite pattern to it:
  3202. Blue = ($F - ((index mod 6)*3)) * $1111
  3203. Green = ($F - (((index div 6) mod 6)*3)) * $1111
  3204. Red = ($F - (((index div 36) mod 6)*3)) * $1111
  3205.  
  3206. This continues until index $D6.  At index $D7, all the missing pure reds
  3207. appear, followed by all the missing pure greens, followed by all the missing
  3208. pure blues, followed by all the missing greys.
  3209. 
  3210. 
  3211. Path: ucivax!gateway
  3212. From: GFT_ROBERT@gsbvxa.uchicago.edu (opcode ranger)
  3213. Subject: Some (weenie?) AppleEvent questions
  3214. Message-ID: <910731145241.22800cef@GSBACD.UCHICAGO.EDU>
  3215. Newsgroups: fa.think-c
  3216. Lines: 85
  3217. Date: 31 Jul 91 19:51:56 GMT
  3218. X-Vmsmail-To: @THINKC
  3219.  
  3220. I have some basic questions regarding AppleEvents.  I found the IM VI
  3221. documentation basically pretty good (and a great improvement over previous
  3222. volumes), but sometimes a little vague.  I realize that some of these questions
  3223. may be dumb, but any help is much appreciated!  (If the answers can be found in
  3224. a doc -- IM, TechNote, sample code -- please let me know).
  3225.  
  3226. 1) I understand how to check to see if you missed any required parameters when
  3227. you're handling a received AppleEvent (although you could use
  3228. AEGetAttributeDesc() instead of AEGetAttributePtr() when checking for the
  3229. keyMissedKeywordAttr, right?  All you're checking for is that it doesn't exist,
  3230. right?).
  3231.  
  3232. Anyway, how does the AppleEvent manager know which the required parameters are?
  3233. Something to do with the keyOptionalKeywordAttr, right?  But how does this work
  3234. exactly?
  3235.  
  3236. 2) When you dispose of an AppleEvent with AEDisposeDesc(), does this dispose of
  3237. the descriptor records of all the contained parameters and attributes too?  I
  3238. would assume so, but the comments to the code on IM VI p. 6-61 made me wonder:
  3239. "be sure to dispose of the event and first parameter before leaving routine".
  3240. It seems to imply that these are two separate things to do.
  3241.  
  3242. 3) The handling of timing out confuses me.  In the example code in IM VI, it
  3243. would seem that if the AESend() times out, one simply punts.  But on page 6-64,
  3244. there is extensive discussion about how if AESend() times out, it doesn't mean
  3245. that the server app will not return a reply.  In particular, I can't entirely
  3246. figure out:
  3247.  
  3248. " If the server finishes processing the Apple event sometime after the time
  3249. specified in the timeout parameter has expired, it returns a reply Apple event
  3250. to AEProcessAppleEvent.  The Apple Event Manager then returns the reply to the
  3251. client in the reply parameter that the client originally passed to the AESend
  3252. function....This means your application can continue to check the reply Apple
  3253. event to see if the server has responded, even after the time expires."
  3254.  
  3255. Now, in the sample code in Listing 6-17 in IM VI, it seems to me that the reply
  3256. record passed to AESend() may be out of scope by the time the server finishes
  3257. processing the AppleEvent, so how can it return "the rpely to the client in the
  3258. reply parameter that the client originally passed to the AESend function"?
  3259.  
  3260. That is, if AESend() times out, and the function MySendMultiplyEvent() returns,
  3261. what's going to happen when the server app finally gets thru processing?
  3262.  
  3263. And along that line, can you dispose of the reply you passed to AESend() before
  3264. the server has finished processing?
  3265.  
  3266. Obviously I'm missing something.  Can someone show me some sample code which
  3267. implements the checking-routine as described in the time-out discussion on p.
  3268. 6-64?
  3269.  
  3270. 4) Here's a really dumb one: what exactly are "OS Events" as defined for the
  3271. idle procs you can write for the AE manager (that is, what kinds of events fall
  3272. into the category "OS Event")?
  3273.  
  3274. 5. What is the difference between the "key" get/put data functions and the
  3275. "param/attribute" get/put data functions?  For example, what is the difference
  3276. between AEGetKeyPtr() and AEGetParamPtr()?  Are the "param/attribute" versions
  3277. of these get/put functions -- in both their "Ptr" and "Desc" variants --
  3278. basically just the same thing as the "key" functions?  On that line, why is
  3279. there an AEDeleteKeyDesc() function and an AEDeleteParam() function , but no
  3280. 'AEDeleteAttribute()' function?
  3281.  
  3282. 6. In numerous descriptions of 'creation' functions you find the phrase "This
  3283. function creates a new descriptor record by copying the descriptor record from
  3284. the parameter" (for instance in AECreateList(), IM VI p.6-88).  What does this
  3285. mean exactly?  In these functions does one have to pass a descriptor record and
  3286. get back a copy?   For instance, does one have to pass an already created
  3287. DescList to AECreateList() and receive back a copy?
  3288.  
  3289.  
  3290. Thanks for any help!
  3291.  
  3292. Robert
  3293.  
  3294. ============================================================================
  3295. = gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "Out there on a   =
  3296. =                             * all my opinions are *  darkened road,   =
  3297. =                                * mine                *  the lights are   =
  3298. =                 *               *  dead and the     =
  3299. =                 *               *  cars explode."   =
  3300. =                 *               *  -- "Good Things",=
  3301. =                 *               *  Sisters of       =
  3302. =                 *               *  Mercy           =
  3303. ============================================================================
  3304.  
  3305. 
  3306. 
  3307. Path: ucivax!gateway
  3308. From: DNEBING@opie.bgsu.edu ("Mr. Neb")
  3309. Subject: Threads...
  3310. Message-ID: <9107311646.aa14036@ics.uci.edu>
  3311. Newsgroups: fa.think-c
  3312. X-VMS-To: IN%"think-c@ics.uci.edu"
  3313. Lines: 9
  3314. Date: 31 Jul 91 23:46:11 GMT
  3315.  
  3316.  
  3317.     I got some code from the last Develop CD dealing with threads on
  3318. the Mac.  It looks really interresting, but I don't have MPW C++... has
  3319. anyone converted this to Think-C?  If so, I would like to know what and
  3320. how you did it (or possibly the modified code.)
  3321.  
  3322.     Thanks in advance,
  3323.     David Nebinger
  3324.     dnebing@opie.bgsu.edu
  3325. 
  3326.